|
Cataclysm BN
|
Manage and cache data about a part of the map. More...
#include <map.h>
Classes | |
| struct | apparent_light_info |
Public Member Functions | |
| map (int mapsize=MAPSIZE, bool zlev=false) | |
| map (bool zlev) | |
| virtual | ~map () |
| map & | operator= (const map &)=delete |
| map & | operator= (map &&) |
| void | set_transparency_cache_dirty (const int zlev) |
| Sets a dirty flag on the a given cache. More... | |
| void | set_transparency_cache_dirty (const tripoint &p) |
| void | set_seen_cache_dirty (const tripoint change_location) |
| void | set_seen_cache_dirty (const int zlevel) |
| void | set_outside_cache_dirty (const int zlev) |
| void | set_floor_cache_dirty (const int zlev) |
| void | set_suspension_cache_dirty (const int zlev) |
| void | set_pathfinding_cache_dirty (int zlev) |
| void | set_memory_seen_cache_dirty (const tripoint &p) |
| void | invalidate_map_cache (const int zlev) |
| bool | check_seen_cache (const tripoint &p) const |
| bool | check_and_set_seen_cache (const tripoint &p) const |
| void | on_vehicle_moved (int smz) |
| Callback invoked when a vehicle has moved. More... | |
| lit_level | apparent_light_at (const tripoint &p, const visibility_variables &cache) const |
| Determine the visible light level for a tile, based on light_at for the tile, vision distance, etc. More... | |
| visibility_type | get_visibility (lit_level ll, const visibility_variables &cache) const |
| std::tuple< maptile, maptile, maptile > | get_wind_blockers (const int &winddirection, const tripoint &pos) |
| void | draw (const catacurses::window &w, const tripoint ¢er) |
Draw a visible part of the map into w. More... | |
| void | drawsq (const catacurses::window &w, const tripoint &p, const drawsq_params ¶ms) const |
| Draw the map tile at the given coordinate. More... | |
| void | save () |
| Add currently loaded submaps (in grid) to the mapbuffer. More... | |
| void | load (const tripoint &w, bool update_vehicles) |
| Load submaps into grid. More... | |
| void | load (const tripoint_abs_sm &w, bool update_vehicles) |
| void | shift (const point &s) |
| Shift the map along the vector s. More... | |
| void | vertical_shift (int newz) |
| Moves the map vertically to (not by!) newz. More... | |
| void | clear_spawns () |
| void | clear_traps () |
| maptile | maptile_at (const tripoint &p) const |
| maptile | maptile_at (const tripoint &p) |
| int | move_cost (const tripoint &p, const vehicle *ignored_vehicle=nullptr) const |
| Calculate the cost to move past the tile at p. More... | |
| int | move_cost (const point &p, const vehicle *ignored_vehicle=nullptr) const |
| bool | impassable (const tripoint &p) const |
| bool | impassable (const point &p) const |
| bool | passable (const tripoint &p) const |
| bool | passable (const point &p) const |
| bool | is_wall_adjacent (const tripoint ¢er) const |
| int | move_cost_ter_furn (const tripoint &p) const |
Similar behavior to move_cost(), but ignores vehicles. More... | |
| int | move_cost_ter_furn (const point &p) const |
| bool | impassable_ter_furn (const tripoint &p) const |
| bool | passable_ter_furn (const tripoint &p) const |
| int | combined_movecost (const tripoint &from, const tripoint &to, const vehicle *ignored_vehicle=nullptr, int modifier=0, bool flying=false, bool via_ramp=false) const |
| Cost to move out of one tile and into the next. More... | |
| bool | valid_move (const tripoint &from, const tripoint &to, bool bash=false, bool flying=false, bool via_ramp=false) const |
Returns true if a creature could walk from from to to in one step. More... | |
| double | ranged_target_size (const tripoint &p) const |
Size of map objects at p for purposes of ranged combat. More... | |
| bool | sees (const tripoint &F, const tripoint &T, int range) const |
Returns whether F sees T with a view range of range. More... | |
| int | obstacle_coverage (const tripoint &loc1, const tripoint &loc2) const |
| Returns coverage of target in relation to the observer. More... | |
| int | coverage (const tripoint &p) const |
| Returns coverage value of the tile. More... | |
| bool | clear_path (const tripoint &f, const tripoint &t, int range, int cost_min, int cost_max) const |
Check whether there's a direct line of sight between F and T with the additional movecost restraints. More... | |
| void | reachable_flood_steps (std::vector< tripoint > &reachable_pts, const tripoint &f, int range, int cost_min, int cost_max) const |
| Populates a vector of points that are reachable within a number of steps from a point. More... | |
| std::vector< tripoint > | find_clear_path (const tripoint &source, const tripoint &destination) const |
| Iteratively tries Bresenham lines with different biases until it finds a clear line or decides there isn't one. More... | |
| bool | accessible_items (const tripoint &t) const |
Check whether the player can access the items located . More... | |
| std::vector< tripoint > | get_dir_circle (const tripoint &f, const tripoint &t) const |
| Calculate next search points surrounding the current position. More... | |
| std::vector< tripoint > | route (const tripoint &f, const tripoint &t, const pathfinding_settings &settings, const std::set< tripoint > &pre_closed={{ }}) const |
| Calculate the best path using A*. More... | |
| VehicleList | get_vehicles () |
| void | add_vehicle_to_cache (vehicle *) |
| void | clear_vehicle_point_from_cache (vehicle *veh, const tripoint &pt) |
| void | update_vehicle_cache (vehicle *, int old_zlevel) |
| void | reset_vehicle_cache () |
| void | clear_vehicle_cache () |
| void | clear_vehicle_list (int zlev) |
| void | update_vehicle_list (const submap *to, int zlev) |
| bool | check_vehicle_zones (int zlev) |
| std::vector< zone_data * > | get_vehicle_zones (int zlev) |
| void | register_vehicle_zone (vehicle *, int zlev) |
| bool | deregister_vehicle_zone (zone_data &zone) |
| std::unique_ptr< vehicle > | detach_vehicle (vehicle *veh) |
| void | destroy_vehicle (vehicle *veh) |
| void | vehmove () |
| bool | vehproceed (VehicleList &vehicle_list) |
| VehicleList | get_vehicles (const tripoint &start, const tripoint &end) |
| optional_vpart_position | veh_at (const tripoint &p) const |
| Checks if tile is occupied by vehicle and by which part. More... | |
| vehicle * | veh_at_internal (const tripoint &p, int &part_num) |
| const vehicle * | veh_at_internal (const tripoint &p, int &part_num) const |
| void | board_vehicle (const tripoint &p, player *pl) |
| void | unboard_vehicle (const vpart_reference &, Character *passenger, bool dead_passenger=false) |
| void | unboard_vehicle (const tripoint &p, bool dead_passenger=false) |
| bool | displace_vehicle (vehicle &veh, const tripoint &dp) |
| void | shift_vehicle_z (vehicle &veh, int z_shift) |
| bool | displace_water (const tripoint &dp) |
| float | vehicle_wheel_traction (const vehicle &veh, bool ignore_movement_modifiers=false) const |
| float | vehicle_vehicle_collision (vehicle &veh, vehicle &veh2, const std::vector< veh_collision > &collisions) |
| units::angle | shake_vehicle (vehicle &veh, int velocity_before, units::angle direction) |
| vehicle * | move_vehicle (vehicle &veh, const tripoint &dp, const tileray &facing) |
| void | set (const tripoint &p, const ter_id &new_terrain, const furn_id &new_furniture) |
| void | set (const point &p, const ter_id &new_terrain, const furn_id &new_furniture) |
| std::string | name (const tripoint &p) |
| std::string | name (const point &p) |
| std::string | disp_name (const tripoint &p) |
| std::string | obstacle_name (const tripoint &p) |
| Returns the name of the obstacle at p that might be blocking movement/projectiles/etc. More... | |
| bool | has_furn (const tripoint &p) const |
| bool | has_furn (const point &p) const |
| furn_id | furn (const tripoint &p) const |
| furn_id | furn (const point &p) const |
| void | furn_set (const tripoint &p, const furn_id &new_furniture, cata::poly_serialized< active_tile_data > new_active=nullptr) |
| Sets the furniture at given position. More... | |
| void | furn_set (const point &p, const furn_id &new_furniture) |
| std::string | furnname (const tripoint &p) |
| std::string | furnname (const point &p) |
| bool | can_move_furniture (const tripoint &pos, player *p=nullptr) |
| ter_id | ter (const tripoint &p) const |
| ter_id | ter (const point &p) const |
| uint8_t | get_known_connections (const tripoint &p, int connect_group, const std::map< tripoint, ter_id > &override={}) const |
| const harvest_id & | get_harvest (const tripoint &p) const |
| Returns the full harvest list, for spawning. More... | |
| const std::set< std::string > & | get_harvest_names (const tripoint &p) const |
| Returns names of the items that would be dropped. More... | |
| ter_id | get_ter_transforms_into (const tripoint &p) const |
| furn_id | get_furn_transforms_into (const tripoint &p) const |
| bool | ter_set (const tripoint &p, const ter_id &new_terrain) |
| bool | ter_set (const point &p, const ter_id &new_terrain) |
| std::string | tername (const tripoint &p) const |
| std::string | tername (const point &p) const |
| bool | has_nearby_fire (const tripoint &p, int radius=1) |
| bool | has_nearby_table (const tripoint &p, int radius=1) |
| Check whether a table/workbench/vehicle kitchen or other flat surface is nearby that could be used for crafting or eating. More... | |
| bool | has_nearby_chair (const tripoint &p, int radius=1) |
| Check whether a chair or vehicle seat is nearby. More... | |
| bool | sees_some_items (const tripoint &p, const Creature &who) const |
| Check if creature can see some items at p. More... | |
| bool | sees_some_items (const tripoint &p, const tripoint &from) const |
| bool | could_see_items (const tripoint &p, const Creature &who) const |
| Check if the creature could see items at p if there were any items. More... | |
| bool | could_see_items (const tripoint &p, const tripoint &from) const |
| bool | has_items (const tripoint &p) const |
| Checks for existence of items. More... | |
| void | examine (Character &p, const tripoint &pos) |
| Calls the examine function of furniture or terrain at given tile, for given character. More... | |
| bool | is_harvestable (const tripoint &pos) const |
| Returns true if point at pos is harvestable right now, with no extra tools. More... | |
| std::string | features (const tripoint &p) |
| std::string | features (const point &p) |
| bool | has_flag (const std::string &flag, const tripoint &p) const |
| bool | has_flag (const std::string &flag, const point &p) const |
| bool | can_put_items (const tripoint &p) const |
| bool | can_put_items (const point &p) const |
| bool | can_put_items_ter_furn (const tripoint &p) const |
| bool | can_put_items_ter_furn (const point &p) const |
| bool | has_flag_ter (const std::string &flag, const tripoint &p) const |
| bool | has_flag_ter (const std::string &flag, const point &p) const |
| bool | has_flag_furn (const std::string &flag, const tripoint &p) const |
| bool | has_flag_furn (const std::string &flag, const point &p) const |
| bool | has_flag_ter_or_furn (const std::string &flag, const tripoint &p) const |
| bool | has_flag_ter_or_furn (const std::string &flag, const point &p) const |
| bool | has_flag (ter_bitflags flag, const tripoint &p) const |
| bool | has_flag (ter_bitflags flag, const point &p) const |
| bool | has_flag_ter (ter_bitflags flag, const tripoint &p) const |
| bool | has_flag_ter (ter_bitflags flag, const point &p) const |
| bool | has_flag_furn (ter_bitflags flag, const tripoint &p) const |
| bool | has_flag_furn (ter_bitflags flag, const point &p) const |
| bool | has_flag_ter_or_furn (ter_bitflags flag, const tripoint &p) const |
| bool | has_flag_ter_or_furn (ter_bitflags flag, const point &p) const |
| bool | is_bashable (const tripoint &p, bool allow_floor=false) const |
| Returns true if there is a bashable vehicle part or the furn/terrain is bashable at p. More... | |
| bool | is_bashable (const point &p) const |
| bool | is_bashable_ter (const tripoint &p, bool allow_floor=false) const |
| Returns true if the terrain at p is bashable. More... | |
| bool | is_bashable_ter (const point &p) const |
| bool | is_bashable_furn (const tripoint &p) const |
| Returns true if the furniture at p is bashable. More... | |
| bool | is_bashable_furn (const point &p) const |
| bool | is_bashable_ter_furn (const tripoint &p, bool allow_floor=false) const |
| Returns true if the furniture or terrain at p is bashable. More... | |
| bool | is_bashable_ter_furn (const point &p) const |
| int | bash_strength (const tripoint &p, bool allow_floor=false) const |
| Returns max_str of the furniture or terrain at p. More... | |
| int | bash_strength (const point &p) const |
| int | bash_resistance (const tripoint &p, bool allow_floor=false) const |
| Returns min_str of the furniture or terrain at p. More... | |
| int | bash_resistance (const point &p) const |
| int | bash_rating (int str, const tripoint &p, bool allow_floor=false) const |
| Returns a success rating from -1 to 10 for a given tile based on a set strength, used for AI movement planning Values roughly correspond to 10% increment chances of success on a given bash, rounded down. More... | |
| int | bash_rating (const int str, const point &p) const |
| void | make_rubble (const tripoint &p, const furn_id &rubble_type, bool items, const ter_id &floor_type, bool overwrite=false) |
| Generates rubble at the given location, if overwrite is true it just writes on top of what currently exists floor_type is only used if there is a non-bashable wall at the location or with overwrite = true. More... | |
| void | make_rubble (const tripoint &p, const furn_id &rubble_type, bool items) |
| void | make_rubble (const tripoint &p) |
| bool | is_outside (const tripoint &p) const |
| bool | is_outside (const point &p) const |
| bool | is_divable (const tripoint &p) const |
| Returns whether or not the terrain at the given location can be dived into (by monsters that can swim or are aquatic or non-breathing). More... | |
| bool | is_divable (const point &p) const |
| bool | is_water_shallow_current (const tripoint &p) const |
| bool | is_water_shallow_current (const point &p) const |
| bool | is_last_ter_wall (bool no_furn, const point &p, const point &max, direction dir) const |
| Check if the last terrain is wall in direction NORTH, SOUTH, WEST or EAST. More... | |
| bool | tinder_at (const tripoint &p) |
| Checks if there are any tinder flagged items on the tile. More... | |
| bool | flammable_items_at (const tripoint &p, int threshold=0) |
| Checks if there are any flammable items on the tile. More... | |
| bool | is_flammable (const tripoint &p) |
| Returns true if there is a flammable item or field or the furn/terrain is flammable at p. More... | |
| point | random_outdoor_tile () |
| void | draw_line_ter (const ter_id &type, const point &p1, const point &p2) |
| void | draw_line_furn (const furn_id &type, const point &p1, const point &p2) |
| void | draw_fill_background (const ter_id &type) |
| void | draw_fill_background (ter_id(*f)()) |
| void | draw_fill_background (const weighted_int_list< ter_id > &f) |
| void | draw_square_ter (const ter_id &type, const point &p1, const point &p2) |
| void | draw_square_furn (const furn_id &type, const point &p1, const point &p2) |
| void | draw_square_ter (ter_id(*f)(), const point &p1, const point &p2) |
| void | draw_square_ter (const weighted_int_list< ter_id > &f, const point &p1, const point &p2) |
| void | draw_rough_circle_ter (const ter_id &type, const point &p, int rad) |
| void | draw_rough_circle_furn (const furn_id &type, const point &p, int rad) |
| void | draw_circle_ter (const ter_id &type, const rl_vec2d &p, double rad) |
| void | draw_circle_ter (const ter_id &type, const point &p, int rad) |
| void | draw_circle_furn (const furn_id &type, const point &p, int rad) |
| void | add_corpse (const tripoint &p) |
| void | translate (const ter_id &from, const ter_id &to) |
| void | translate_radius (const ter_id &from, const ter_id &to, float radi, const tripoint &p, bool same_submap=false, bool toggle_between=false) |
| bool | close_door (const tripoint &p, bool inside, bool check_only) |
| bool | open_door (const tripoint &p, bool inside, bool check_only=false) |
| void | batter (const tripoint &p, int power, int tries=1, bool silent=false) |
| bash a square for a set number of times at set power. More... | |
| void | destroy (const tripoint &p, bool silent=false) |
| Keeps bashing a square until it can't be bashed anymore. More... | |
| void | destroy_furn (const tripoint &p, bool silent=false) |
| Keeps bashing a square until there is no more furniture. More... | |
| void | crush (const tripoint &p) |
| void | shoot (const tripoint &p, projectile &proj, bool hit_items) |
| int | collapse_check (const tripoint &p) |
| Checks if a square should collapse, returns the X for the one_in(X) collapse chance. More... | |
| void | collapse_at (const tripoint &p, bool silent, bool was_supporting=false, bool destroy_pos=true) |
| Causes a collapse at p, such as from destroying a wall. More... | |
| void | propagate_suspension_check (const tripoint &point) |
| Checks surrounding tiles for suspension, and has them check for collapse. More... | |
| void | collapse_invalid_suspension (const tripoint &point) |
| Triggers a recursive collapse of suspended tiles based on their support validity. More... | |
| bool | is_suspension_valid (const tripoint &point) |
| Checks the four orientations in which a suspended tile could be valid, and returns if the tile is valid. More... | |
| void | smash_items (const tripoint &p, int power, const std::string &cause_message, bool do_destroy) |
| Tries to smash the items at the given tripoint. More... | |
| bash_results | bash (const tripoint &p, int str, bool silent=false, bool destroy=false, bool bash_floor=false, const vehicle *bashing_vehicle=nullptr) |
| Returns a pair where first is whether anything was smashed and second is if it was destroyed. More... | |
| bash_results | bash_vehicle (const tripoint &p, const bash_params ¶ms) |
| bash_results | bash_ter_furn (const tripoint &p, const bash_params ¶ms) |
| bool | hit_with_acid (const tripoint &p) |
| bool | hit_with_fire (const tripoint &p) |
| bool | has_adjacent_furniture_with (const tripoint &p, const std::function< bool(const furn_t &)> &filter) |
| Returns true if there is furniture for which filter returns true in a 1 tile radius of p. More... | |
| bool | mop_spills (const tripoint &p) |
| Remove moppable fields/items at this location. More... | |
| void | decay_fields_and_scent (const time_duration &amount) |
| Moved here from weather.cpp for speed. More... | |
| std::string | get_signage (const tripoint &p) const |
| void | set_signage (const tripoint &p, const std::string &message) const |
| void | delete_signage (const tripoint &p) const |
| int | get_radiation (const tripoint &p) const |
| void | set_radiation (const tripoint &p, int value) |
| void | set_radiation (const point &p, const int value) |
| void | adjust_radiation (const tripoint &p, int delta) |
| Increment the radiation in the given tile by the given delta (decrement it if delta is negative) More... | |
| void | adjust_radiation (const point &p, const int delta) |
| int | get_temperature (const tripoint &p) const |
| void | set_temperature (const tripoint &p, int temperature) |
| void | set_temperature (const point &p, int new_temperature) |
| std::vector< tripoint > | check_submap_active_item_consistency () |
| map_stack | i_at (const tripoint &p) |
| map_stack | i_at (const point &p) |
| item | water_from (const tripoint &p) |
| void | i_clear (const tripoint &p) |
| void | i_clear (const point &p) |
| map_stack::iterator | i_rem (const tripoint &p, map_stack::const_iterator it) |
| map_stack::iterator | i_rem (const point &location, map_stack::const_iterator it) |
| void | i_rem (const tripoint &p, item *it) |
| void | i_rem (const point &p, item *it) |
| void | spawn_artifact (const tripoint &p) |
| void | spawn_natural_artifact (const tripoint &p, artifact_natural_property prop) |
| void | spawn_item (const tripoint &p, const itype_id &type_id, unsigned quantity=1, int charges=0, const time_point &birthday=calendar::start_of_cataclysm, int damlevel=0) |
| void | spawn_item (const point &p, const itype_id &type_id, unsigned quantity=1, int charges=0, const time_point &birthday=calendar::start_of_cataclysm, int damlevel=0) |
| void | spawn_item (const tripoint &p, const std::string &type_id, unsigned quantity=1, int charges=0, const time_point &birthday=calendar::start_of_cataclysm, int damlevel=0) |
| void | spawn_item (const point &p, const std::string &type_id, unsigned quantity=1, int charges=0, const time_point &birthday=calendar::start_of_cataclysm, int damlevel=0) |
| units::volume | max_volume (const tripoint &p) |
| units::volume | free_volume (const tripoint &p) |
| units::volume | stored_volume (const tripoint &p) |
| item & | add_item_or_charges (const tripoint &pos, item obj, bool overflow=true) |
| Adds an item to map tile or stacks charges. More... | |
| item & | add_item_or_charges (const point &p, item obj, bool overflow=true) |
| item & | add_item (const tripoint &p, item new_item) |
| Place an item on the map, despite the parameter name, this is not necessarily a new item. More... | |
| void | add_item (const point &p, item new_item) |
| item & | spawn_an_item (const tripoint &p, item new_item, int charges, int damlevel) |
| void | spawn_an_item (const point &p, item new_item, int charges, int damlevel) |
| void | make_active (item_location &loc) |
| Update an item's active status, for example when adding hot or perishable liquid to a container. More... | |
| void | update_lum (item_location &loc, bool add) |
| Update luminosity before and after item's transformation. More... | |
Static Public Member Functions | |
| static apparent_light_info | apparent_light_helper (const level_cache &map_cache, const tripoint &p) |
| Helper function for light claculation; exposed here for map editor. More... | |
Private Member Functions | |
| maptile | maptile_at_internal (const tripoint &p) const |
| maptile | maptile_at_internal (const tripoint &p) |
| std::pair< tripoint, maptile > | maptile_has_bounds (const tripoint &p, bool bounds_checked) |
| std::array< std::pair< tripoint, maptile >, 8 > | get_neighbors (const tripoint &p) |
| void | spread_gas (field_entry &cur, const tripoint &p, int percent_spread, const time_duration &outdoor_age_speedup, scent_block &sblk) |
| void | create_hot_air (const tripoint &p, int intensity) |
| bool | gas_can_spread_to (field_entry &cur, const maptile &dst) |
| void | gas_spread_to (field_entry &cur, maptile &dst, const tripoint &p) |
| int | burn_body_part (player &u, field_entry &cur, body_part bp, int scale) |
| bool | sees (const tripoint &F, const tripoint &T, int range, int &bresenham_slope) const |
| Don't expose the slope adjust outside map functions. More... | |
Friends | |
| class | editmap |
| class | visitable< map_cursor > |
Consume items on the map | |
The functions here consume accessible items / item charges on the map or in vehicles around the player (whose positions is given as origin). They return a list of copies of the consumed items (with the actually consumed charges in it). The quantity / amount parameter will be reduced by the number of items/charges removed. If all required items could be removed from the map, the quantity/amount will be 0, otherwise it will contain a positive value and the remaining items must be gathered from somewhere else. | |
| enum | iteration_state { ITER_CONTINUE = 0 , ITER_SKIP_SUBMAP , ITER_SKIP_ZLEVEL , ITER_FINISH } |
Enum used by functors in function_over to control execution. More... | |
| std::set< tripoint > | support_cache_dirty |
| std::vector< submap * > | grid |
| The list of currently loaded submaps. More... | |
| std::vector< std::vector< tripoint > > | traplocs |
| This vector contains an entry for each trap type, it has therefor the same size as the traplist vector. More... | |
| std::vector< tripoint > | field_furn_locs |
| Vector of tripoints containing active field-emitting furniture. More... | |
| std::array< std::unique_ptr< level_cache >, OVERMAP_LAYERS > | caches |
| Holds caches for visibility, light, transparency and vehicles. More... | |
| std::array< std::unique_ptr< pathfinding_cache >, OVERMAP_LAYERS > | pathfinding_caches |
| std::set< tripoint > | submaps_with_active_items |
| Set of submaps that contain active items in absolute coordinates. More... | |
| lru_cache< point, char > | skew_vision_cache |
| Cache of coordinate pairs recently checked for visibility. More... | |
| VehicleList | last_full_vehicle_list |
| Vehicle list doesn't change often, but is pretty expensive. More... | |
| bool | last_full_vehicle_list_dirty = true |
| visibility_variables | visibility_variables_cache |
| cata::optional< std::pair< tripoint, int > > | max_populated_zlev = cata::nullopt |
| std::set< vehicle * > | dirty_vehicle_list |
| int | my_MAPSIZE |
| bool | zlevels |
| tripoint | abs_sub |
| Absolute coordinates of first submap (get_submap_at(0,0)) This is in submap coordinates (see overmapbuffer for explanation). More... | |
| std::list< item > | use_amount_square (const tripoint &p, const itype_id &type, int &quantity, const std::function< bool(const item &)> &filter=return_true< item >) |
| std::list< item > | use_amount (const tripoint &origin, int range, const itype_id &type, int &quantity, const std::function< bool(const item &)> &filter=return_true< item >) |
| std::list< item > | use_charges (const tripoint &origin, int range, const itype_id &type, int &quantity, const std::function< bool(const item &)> &filter=return_true< item >, basecamp *bcp=nullptr) |
| std::vector< item * > | place_items (const item_group_id &loc, int chance, const tripoint &p1, const tripoint &p2, bool ongrass, const time_point &turn, int magazine=0, int ammo=0) |
| Place items from item group in the rectangle f - t. More... | |
| std::vector< item * > | place_items (const item_group_id &loc, int chance, const point &p1, const point &p2, bool ongrass, const time_point &turn, int magazine=0, int ammo=0) |
| std::vector< item * > | put_items_from_loc (const item_group_id &loc, const tripoint &p, const time_point &turn=calendar::start_of_cataclysm) |
| Place items from an item group at p. More... | |
| std::vector< item * > | spawn_items (const tripoint &p, const std::vector< item > &new_items) |
| void | spawn_items (const point &p, const std::vector< item > &new_items) |
| void | create_anomaly (const tripoint &p, artifact_natural_property prop, bool create_rubble=true) |
| void | create_anomaly (const point &cp, artifact_natural_property prop, bool create_rubble=true) |
| void | partial_con_set (const tripoint &p, const partial_con &con) |
| void | partial_con_remove (const tripoint &p) |
| partial_con * | partial_con_at (const tripoint &p) |
| void | trap_set (const tripoint &p, const trap_id &type) |
| const trap & | tr_at (const tripoint &p) const |
| bool | can_see_trap_at (const tripoint &p, const Character &c) const |
| See trap::can_see, which is called for the trap here. More... | |
| void | disarm_trap (const tripoint &p) |
| void | remove_trap (const tripoint &p) |
| const std::vector< tripoint > & | get_furn_field_locations () const |
| const std::vector< tripoint > & | trap_locations (const trap_id &type) const |
| void | create_burnproducts (const tripoint &p, const item &fuel, const units::mass &burned_mass) |
| void | process_fields () |
| void | process_fields_in_submap (submap *current_submap, const tripoint &submap_pos) |
| void | creature_in_field (Creature &critter) |
| Apply field effects to the creature when it's on a square with fields. More... | |
| void | creature_on_trap (Creature &critter, bool may_avoid=true) |
| Apply trap effects to the creature, similar to creature_in_field. More... | |
| const field & | field_at (const tripoint &p) const |
| Get the fields that are here. More... | |
| field & | field_at (const tripoint &p) |
| Gets fields that are here. More... | |
| time_duration | get_field_age (const tripoint &p, const field_type_id &type) const |
Get the age of a field entry (field_entry::age), if there is no field of that type, returns -1_turns. More... | |
| int | get_field_intensity (const tripoint &p, const field_type_id &type) const |
| Get the intensity of a field entry (field_entry::intensity), if there is no field of that type, returns 0. More... | |
| time_duration | mod_field_age (const tripoint &p, const field_type_id &type, const time_duration &offset) |
| Increment/decrement age of field entry at point. More... | |
| int | mod_field_intensity (const tripoint &p, const field_type_id &type, int offset) |
| Increment/decrement intensity of field entry at point, creating if not present, removing if intensity becomes 0. More... | |
| time_duration | set_field_age (const tripoint &p, const field_type_id &type, const time_duration &age, bool isoffset=false) |
| Set age of field entry at point. More... | |
| int | set_field_intensity (const tripoint &p, const field_type_id &type, int new_intensity, bool isoffset=false) |
| Set intensity of field entry at point, creating if not present, removing if intensity becomes 0. More... | |
| field_entry * | get_field (const tripoint &p, const field_type_id &type) |
| Get field of specific type at point. More... | |
| bool | dangerous_field_at (const tripoint &p) |
| bool | add_field (const tripoint &p, const field_type_id &type_id, int intensity=INT_MAX, const time_duration &age=0_turns, bool hit_player=true) |
| Add field entry at point, or set intensity if present. More... | |
| void | remove_field (const tripoint &p, const field_type_id &field_to_remove) |
| Remove field entry at xy, ignored if the field entry is not present. More... | |
| void | add_splatter (const field_type_id &type, const tripoint &where, int intensity=1) |
| void | add_splatter_trail (const field_type_id &type, const tripoint &from, const tripoint &to) |
| void | add_splash (const field_type_id &type, const tripoint ¢er, int radius, int intensity) |
| void | propagate_field (const tripoint ¢er, const field_type_id &type, int amount, int max_intensity=0) |
| void | emit_field (const tripoint &pos, const emit_id &src, float mul=1.0f) |
| Runs one cycle of emission src which may result in propagation of fields. More... | |
| void | scent_blockers (std::array< std::array< bool, MAPSIZE_X >, MAPSIZE_Y > &blocks_scent, std::array< std::array< bool, MAPSIZE_X >, MAPSIZE_Y > &reduces_scent, const point &min, const point &max) |
| Build the map of scent-resistant tiles. More... | |
| computer * | computer_at (const tripoint &p) |
| computer * | add_computer (const tripoint &p, const std::string &name, int security) |
| void | add_camp (const tripoint_abs_omt &omt_pos, const std::string &name) |
| void | remove_submap_camp (const tripoint &) |
| basecamp | hoist_submap_camp (const tripoint &p) |
| bool | point_within_camp (const tripoint &point_check) const |
| bool | has_graffiti_at (const tripoint &p) const |
| const std::string & | graffiti_at (const tripoint &p) const |
| void | set_graffiti (const tripoint &p, const std::string &contents) |
| void | delete_graffiti (const tripoint &p) |
| int | climb_difficulty (const tripoint &p) const |
| Checks 3x3 block centered on p for terrain to climb. More... | |
| bool | has_floor (const tripoint &p) const |
| bool | supports_above (const tripoint &p) const |
| Does this tile support vehicles and furniture above it. More... | |
| bool | has_floor_or_support (const tripoint &p) const |
| void | drop_everything (const tripoint &p) |
| Handles map objects of given type (not creatures) falling down. More... | |
| void | drop_furniture (const tripoint &p) |
| void | drop_items (const tripoint &p) |
| void | drop_vehicle (const tripoint &p) |
| void | drop_fields (const tripoint &p) |
| void | process_falling () |
| Invoked drop_everything on cached dirty tiles. More... | |
| bool | is_cornerfloor (const tripoint &p) const |
| void | generate (const tripoint &p, const time_point &when) |
| void | place_spawns (const mongroup_id &group, int chance, const point &p1, const point &p2, float density, bool individual=false, bool friendly=false, const std::string &name="NONE", int mission_id=-1) |
| void | place_gas_pump (const point &p, int charges, const std::string &fuel_type) |
| void | place_gas_pump (const point &p, int charges) |
| void | place_toilet (const point &p, int charges=6 *4) |
| void | place_vending (const point &p, const item_group_id &type, bool reinforced=false) |
| character_id | place_npc (const point &p, const string_id< npc_template > &type, bool force=false) |
| void | apply_faction_ownership (const point &p1, const point &p2, const faction_id &id) |
| void | add_spawn (const mtype_id &type, int count, const tripoint &p, bool friendly=false, int faction_id=-1, int mission_id=-1, const std::string &name="NONE") const |
| void | do_vehicle_caching (int z) |
| void | build_map_cache (int zlev, bool skip_lightmap=false) |
| void | build_obstacle_cache (const tripoint &start, const tripoint &end, float(&obstacle_cache)[MAPSIZE_X][MAPSIZE_Y]) |
| vehicle * | add_vehicle (const vgroup_id &type, const tripoint &p, units::angle dir, int init_veh_fuel=-1, int init_veh_status=-1, bool merge_wrecks=true) |
| vehicle * | add_vehicle (const vgroup_id &type, const point &p, units::angle dir, int init_veh_fuel=-1, int init_veh_status=-1, bool merge_wrecks=true) |
| vehicle * | add_vehicle (const vproto_id &type, const tripoint &p, units::angle dir, int init_veh_fuel=-1, int init_veh_status=-1, bool merge_wrecks=true) |
| vehicle * | add_vehicle (const vproto_id &type, const point &p, units::angle dir, int init_veh_fuel=-1, int init_veh_status=-1, bool merge_wrecks=true) |
| float | light_transparency (const tripoint &p) const |
| lit_level | light_at (const tripoint &p) const |
| float | ambient_light_at (const tripoint &p) const |
| bool | is_transparent (const tripoint &p) const |
Returns whether the tile at p is transparent(you can look past it). More... | |
| bool | pl_sees (const tripoint &t, int max_range) const |
| Whether the player character (g->u) can see the given square (local map coordinates). More... | |
| bool | pl_line_of_sight (const tripoint &t, int max_range) const |
| Uses the map cache to tell if the player could see the given square. More... | |
| tripoint | get_abs_sub () const |
| return abs_sub More... | |
| tripoint | getabs (const tripoint &p) const |
| Translates local (to this map) coordinates of a square to global absolute coordinates. More... | |
| point | getabs (const point &p) const |
| tripoint | getlocal (const tripoint &p) const |
| Inverse of getabs. More... | |
| point | getlocal (const point &p) const |
| virtual bool | inbounds (const tripoint &p) const |
| bool | inbounds (const point &p) const |
| bool | inbounds_z (const int z) const |
| void | clip_to_bounds (tripoint &p) const |
| Clips the coordinates of p to fit the map bounds. More... | |
| void | clip_to_bounds (int &x, int &y) const |
| void | clip_to_bounds (int &x, int &y, int &z) const |
| int | getmapsize () const |
| bool | has_zlevels () const |
| void | rotate (int turns, bool setpos_safe=false) |
| Rotates this map, and all of its contents, by the specified multiple of 90 degrees. More... | |
| void | spawn_monsters (bool ignore_sight) |
| Spawn monsters from submap spawn points and from the overmap. More... | |
| void | rotten_item_spawn (const item &item, const tripoint &p) |
| Checks to see if the item that is rotting away generates a creature when it does. More... | |
| void | build_outside_cache (int zlev) |
| bool | build_floor_cache (int zlev) |
| void | build_floor_caches () |
| void | update_suspension_cache (const int &z) |
| bash_results | bash_items (const tripoint &p, const bash_params ¶ms) |
| bash_results | bash_field (const tripoint &p, const bash_params ¶ms) |
| bash_results | bash_ter_success (const tripoint &p, const bash_params ¶ms) |
| bash_results | bash_furn_success (const tripoint &p, const bash_params ¶ms) |
| void | process_items () |
| const level_cache & | get_cache_ref (int zlev) const |
| const pathfinding_cache & | get_pathfinding_cache_ref (int zlev) const |
| void | update_pathfinding_cache (int zlev) const |
| void | update_visibility_cache (int zlev) |
| const visibility_variables & | get_visibility_variables_cache () const |
| void | update_submap_active_item_status (const tripoint &p) |
| const std::set< tripoint > & | get_submaps_with_active_items () const |
| tripoint_range< tripoint > | points_in_rectangle (const tripoint &from, const tripoint &to) const |
| tripoint_range< tripoint > | points_in_radius (const tripoint ¢er, size_t radius, size_t radiusz=0) const |
| tripoint_range< tripoint > | points_on_zlevel () const |
| Yields a range of all points that are contained in the map and have the z-level of this map (abs_sub). More... | |
| tripoint_range< tripoint > | points_on_zlevel (int z) const |
| Same as above, but uses the specific z-level. More... | |
| std::list< item_location > | get_active_items_in_radius (const tripoint ¢er, int radius) const |
| std::list< item_location > | get_active_items_in_radius (const tripoint ¢er, int radius, special_item_type type) const |
| std::list< tripoint > | find_furnitures_with_flag_in_radius (const tripoint ¢er, size_t radius, const std::string &flag, size_t radiusz=0) |
| returns positions of furnitures with matching flag in the specified radius More... | |
| std::list< Creature * > | get_creatures_in_radius (const tripoint ¢er, size_t radius, size_t radiusz=0) |
| returns creatures in specified radius More... | |
| level_cache & | access_cache (int zlev) |
| const level_cache & | access_cache (int zlev) const |
| bool | dont_draw_lower_floor (const tripoint &p) |
| void | support_dirty (const tripoint &p) |
| void | spawn_monsters_submap (const tripoint &gp, bool ignore_sight) |
| void | spawn_monsters_submap_group (const tripoint &gp, mongroup &group, bool ignore_sight) |
| field & | get_field (const tripoint &p) |
| submap * | getsubmap (size_t grididx) const |
| Get the submap pointer with given index in grid, the index must be valid! More... | |
| submap * | get_submap_at (const tripoint &p) const |
| Get the submap pointer containing the specified position within the reality bubble. More... | |
| submap * | get_submap_at (const point &p) const |
| submap * | get_submap_at (const tripoint &p, point &offset_p) const |
| Get the submap pointer containing the specified position within the reality bubble. More... | |
| submap * | get_submap_at (const point &p, point &offset_p) const |
| submap * | get_submap_at_grid (const point &gridp) const |
| Get submap pointer in the grid at given grid coordinates. More... | |
| submap * | get_submap_at_grid (const tripoint &gridp) const |
| int | calc_max_populated_zlev () |
| Caclulate the greatest populated zlevel in the loaded submaps and save in the level cache. More... | |
| void | invalidate_max_populated_zlev (int zlev) |
| Conditionally invalidates max_pupulated_zlev cache if the submap uniformity change occurs above current max_pupulated_zlev value. More... | |
| int | move_cost_internal (const furn_t &furniture, const ter_t &terrain, const vehicle *veh, int vpart) const |
| Internal versions of public functions to avoid checking same variables multiple times. More... | |
| int | bash_rating_internal (int str, const furn_t &furniture, const ter_t &terrain, bool allow_floor, const vehicle *veh, int part) const |
| bool | draw_maptile (const catacurses::window &w, const tripoint &p, const maptile &tile, const drawsq_params ¶ms) const |
| Internal version of the drawsq. More... | |
| void | draw_from_above (const catacurses::window &w, const tripoint &p, const maptile &tile, const drawsq_params ¶ms) const |
| Draws the tile as seen from above. More... | |
| int | determine_wall_corner (const tripoint &p) const |
| void | apply_light_source (const tripoint &p, float luminance) |
| void | add_light_source (const tripoint &p, float luminance) |
| void | apply_directional_light (const tripoint &p, int direction, float luminance) |
| void | apply_light_arc (const tripoint &p, units::angle, float luminance, units::angle wideangle=30_degrees) |
| void | apply_light_ray (bool lit[MAPSIZE_X][MAPSIZE_Y], const tripoint &s, const tripoint &e, float luminance) |
| void | add_light_from_items (const tripoint &p, item_stack::iterator begin, item_stack::iterator end) |
| std::unique_ptr< vehicle > | add_vehicle_to_map (std::unique_ptr< vehicle > veh, bool merge_wrecks) |
| Takes a vehicle already created with new and attempts to place it on the map, checking for collisions. More... | |
| ter_id | get_roof (const tripoint &p, bool allow_air) const |
| void | process_items_in_submap (submap ¤t_submap, const tripoint &gridp) |
| void | process_items_in_vehicles (submap ¤t_submap) |
| void | process_items_in_vehicle (vehicle &cur_veh, submap ¤t_submap) |
| template<typename Functor > | |
| void | function_over (const tripoint &start, const tripoint &end, Functor fun) const |
| Runs a functor over given submaps over submaps in the area, getting next submap only when the current one "runs out" rather than every time. More... | |
| level_cache & | get_cache (int zlev) const |
| pathfinding_cache & | get_pathfinding_cache (int zlev) const |
| void | saven (const tripoint &grid) |
| void | loadn (const tripoint &grid, bool update_vehicles) |
| void | loadn (const point &grid, bool update_vehicles) |
| void | actualize (const tripoint &grid) |
| Fast forward a submap that has just been loading into this map. More... | |
| void | add_roofs (const tripoint &grid) |
| Hacks in missing roofs. More... | |
| template<typename Container > | |
| void | remove_rotten_items (Container &items, const tripoint &p) |
| Go through the list of items, update their rotten status and remove items that have rotten away completely. More... | |
| void | fill_funnels (const tripoint &p, const time_point &since) |
| Try to fill funnel based items here. More... | |
| void | grow_plant (const tripoint &p) |
| Try to grow a harvestable plant to the next stage(s). More... | |
| void | restock_fruits (const tripoint &p, const time_duration &time_since_last_actualize) |
| Try to grow fruits on static plants (not planted by the player) More... | |
| void | produce_sap (const tripoint &p, const time_duration &time_since_last_actualize) |
| Produce sap on tapped maple trees. More... | |
| void | rad_scorch (const tripoint &p, const time_duration &time_since_last_actualize) |
| Radiation-related plant (and fungus?) death. More... | |
| void | decay_cosmetic_fields (const tripoint &p, const time_duration &time_since_last_actualize) |
| void | player_in_field (player &u) |
| void | monster_in_field (monster &z) |
| void | shift_traps (const tripoint &shift) |
| As part of the map shifting, this shifts the trap locations stored in traplocs. More... | |
| void | copy_grid (const tripoint &to, const tripoint &from) |
| void | draw_map (mapgendata &dat) |
| void | draw_office_tower (mapgendata &dat) |
| void | draw_lab (mapgendata &dat) |
| void | draw_temple (mapgendata &dat) |
| void | draw_mine (mapgendata &dat) |
| void | draw_anthill (mapgendata &dat) |
| void | draw_slimepit (mapgendata &dat) |
| void | draw_triffid (mapgendata &dat) |
| void | draw_connections (mapgendata &dat) |
| bool | build_transparency_cache (int zlev) |
| bool | build_vision_transparency_cache (int zlev) |
| void | build_sunlight_cache (int pzlev) |
| void | generate_lightmap (int zlev) |
| void | build_seen_cache (const tripoint &origin, int target_z) |
| Calculates the Field Of View for the provided map from the given x, y coordinates. More... | |
| void | apply_character_light (Character &p) |
| void | set_abs_sub (const tripoint &p) |
| Sets abs_sub, see there. More... | |
| size_t | get_nonant (const tripoint &gridp) const |
| Get the index of a submap pointer in the grid given by grid coordinates. More... | |
| size_t | get_nonant (const point &gridp) const |
| void | setsubmap (size_t grididx, submap *smap) |
| Set the submap pointer in grid at the give index. More... | |
Manage and cache data about a part of the map.
Despite the name, this class isn't actually responsible for managing the map as a whole. For that function, see mapbuffer. Instead, this class loads a part of the mapbuffer into a cache, and adds certain temporary information such as lighting calculations to it.
To understand the following descriptions better, you should also read Map Management
The map coordinates always start at (0, 0) for the top-left and end at (map_width-1, map_height-1) for the bottom-right.
The actual map data is stored in submap instances. These instances are managed by mapbuffer. References to the currently active submaps are stored in map::grid: 0 1 2 3 4 5 6 7 8 In this example, the top-right submap would be at grid[2].
When the player moves between submaps, the whole map is shifted, so that if the player moves one submap to the right, (0, 0) now points to a tile one submap to the right from before
|
private |
| map::map | ( | int | mapsize = MAPSIZE, |
| bool | zlev = false |
||
| ) |
Definition at line 169 of file map.cpp.
References caches, trap::count(), dbg, grid, Info, my_MAPSIZE, OVERMAP_LAYERS, pathfinding_caches, ptr(), traplocs, and zlevels.
Referenced by check_submap_active_item_consistency().
|
virtualdefault |
| level_cache & map::access_cache | ( | int | zlev | ) |
Definition at line 8526 of file map.cpp.
References caches, debugmsg, nullcache, OVERMAP_DEPTH, and OVERMAP_HEIGHT.
Referenced by get_known_connections(), game::place_player_overmap(), process_items(), and game::vertical_shift().
| const level_cache & map::access_cache | ( | int | zlev | ) | const |
Definition at line 8536 of file map.cpp.
References caches, debugmsg, nullcache, OVERMAP_DEPTH, and OVERMAP_HEIGHT.
| bool map::accessible_items | ( | const tripoint & | t | ) | const |
Check whether the player can access the items located .
Certain furniture/terrain may prevent that (e.g. a locked safe).
Definition at line 6444 of file map.cpp.
References has_flag().
Referenced by basecamp::form_crafting_inventory(), inventory::form_from_map(), and use_charges().
|
protected |
Fast forward a submap that has just been loading into this map.
This is used to rot and remove rotten items, grow plants, fill funnels etc.
Definition at line 7268 of file map.cpp.
References debugmsg, decay_cosmetic_fields(), field_furn_locs, fill_funnels(), furn(), submap::get_items(), get_submap_at_grid(), submap::get_ter(), submap::get_trap(), grid, grow_plant(), submap::last_touched, int_id< T >::obj(), produce_sap(), rad_scorch(), remove_rotten_items(), restock_fruits(), SEEX, SEEY, sm_to_ms_copy(), ter(), int_id< T >::to_i(), tr_ledge, tr_null, traplocs, and calendar::turn.
Referenced by loadn().
| void map::add_camp | ( | const tripoint_abs_omt & | omt_pos, |
| const std::string & | name | ||
| ) |
Definition at line 5561 of file map.cpp.
References overmapbuffer::add_camp(), g, name(), and overmap_buffer.
Definition at line 5783 of file mapgen.cpp.
References submap::get_computer(), get_submap_at(), name(), submap::set_computer(), t_console, and ter_set().
Referenced by jmapgen_computer::apply(), create_lab_consoles(), draw_lab(), mission_start::place_npc_software(), and science_room().
| void map::add_corpse | ( | const tripoint & | p | ) |
Definition at line 8263 of file map.cpp.
References add_item_or_charges(), item::make_corpse(), mon_zombie, one_in(), put_items_from_loc(), and item::set_flag().
Referenced by add_corpse(), MapExtras::mx_looters(), MapExtras::mx_mayhem(), and MapExtras::mx_minefield().
| bool map::add_field | ( | const tripoint & | p, |
| const field_type_id & | type_id, | ||
| int | intensity = INT_MAX, |
||
| const time_duration & | age = 0_turns, |
||
| bool | hit_player = true |
||
| ) |
Add field entry at point, or set intensity if present.
Definition at line 5390 of file map.cpp.
References field_type::accelerated_decay, field::add_field(), creature_in_field(), debugmsg, field_type::dirty_transparency_cache, level_cache::field_cache, submap::field_count, g, get_cache(), submap::get_field(), get_map(), field_type::get_max_intensity(), get_player_character(), get_submap_at(), inbounds(), invalidate_max_populated_zlev(), field_type::is_dangerous(), field_type::is_transparent(), submap::is_uniform, MAPSIZE, Character::pos(), SEEX, set_pathfinding_cache_dirty(), set_seen_cache_dirty(), set_transparency_cache_dirty(), support_dirty(), tripoint::x, tripoint::y, tripoint::z, and zlevels.
Referenced by jmapgen_field::apply(), start_location::burn(), create_anomaly(), create_hot_air(), draw_lab(), draw_mine(), draw_temple(), draw_triffid(), drop_fields(), gas_spread_to(), hit_with_fire(), madd_field(), MapExtras::mx_casings(), MapExtras::mx_corpses(), MapExtras::mx_drugdeal(), MapExtras::mx_looters(), MapExtras::mx_mayhem(), MapExtras::mx_minefield(), MapExtras::mx_portal_in(), MapExtras::mx_roadblock(), MapExtras::mx_spider(), game::process_artifact(), process_fields_in_submap(), set_field_intensity(), shoot(), explosion_iuse::trigger_explosion(), and consume_drug_iuse::use().
Definition at line 1276 of file map.h.
References abs_sub, add_item(), and tripoint::z.
Place an item on the map, despite the parameter name, this is not necessarily a new item.
WARNING: does -not- check volume or stack charges. player functions (drop etc) should use map::add_item_or_charges
Definition at line 4312 of file map.cpp.
References abs_sub, item::active, submap::active_items, active_item_cache::add(), item::convert(), active_item_cache::empty(), fd_fire, use_function::get_actor_ptr(), get_field(), submap::get_items(), get_submap_at(), itype::get_use(), getabs(), item::has_flag(), has_flag(), item::has_var(), inbounds(), invalidate_max_populated_zlev(), item::is_food(), item::is_map(), item::is_transformable(), submap::is_uniform, LIQUID, item::made_of(), ms_to_omt_copy(), item::needs_processing(), null_item_reference(), item::process(), SEEX, SEEY, item::set_var(), submaps_with_active_items, iuse_transform::target, item::type, submap::update_lum_add(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by add_item(), add_item_or_charges(), draw_mine(), extract_or_wreck_cbms(), place_gas_pump(), place_toilet(), and game::wield().
Definition at line 1264 of file map.h.
References abs_sub, add_item_or_charges(), and tripoint::z.
Adds an item to map tile or stacks charges.
| pos | Where to add item |
| obj | Item to add |
| overflow | if destination is full attempt to drop on adjacent tiles |
Definition at line 4212 of file map.cpp.
References add_item(), string_id< T >::c_str(), item::charges, closest_points_first(), item::count_by_charges(), debugmsg, free_volume(), item::has_flag(), has_flag(), i_at(), inbounds(), LIQUID, item::made_of(), MAX_ITEM_IN_SQUARE, null_item_reference(), item::on_drop(), wrapped_vehicle::pos, route(), item_stack::size(), support_dirty(), item::typeId(), and item::volume().
Referenced by add_corpse(), add_item_or_charges(), MapgenRemovePartHandler::add_item_or_charges(), jmapgen_liquid_item::apply(), game::catch_a_monster(), doors::close_door(), complete_construction(), game::disable_robot(), draw_lab(), drop_items(), npc::drop_items(), iexamine::elevator(), explosion_handler::emp_blast(), farm_action(), talk_function::field_plant(), game::forced_door_closing(), pickup::handle_spillable_contents(), map_stack::insert(), make_mon_corpse(), make_rubble(), MapExtras::mx_grave(), MapExtras::mx_mayhem(), MapExtras::mx_minefield(), om_set_hide_site(), Character::place_corpse(), basecamp::place_results(), process_fields_in_submap(), rcdrive(), smash_items(), spawn_an_item(), spawn_artifact(), spawn_items(), spawn_natural_artifact(), item_contents::spill_contents(), mdeath::splatter(), and unpack_actor::use().
|
private |
Definition at line 63 of file lightmap.cpp.
References add_light_source(), and apply_light_arc().
Referenced by generate_lightmap().
|
private |
Definition at line 582 of file lightmap.cpp.
References get_cache(), level_cache::light_source_buffer, tripoint::x, tripoint::y, and tripoint::z.
Referenced by add_light_from_items(), and generate_lightmap().
|
protected |
Hacks in missing roofs.
Should be removed when 3D mapgen is done.
Definition at line 7322 of file map.cpp.
References debugmsg, get_submap_at_grid(), submap::get_ter(), grid, string_id< T >::id(), OVERMAP_DEPTH, ter_t::roof, SEEX, SEEY, submap::set_ter(), t_open_air, t_rock_floor, tripoint_below, and zlevels.
Referenced by loadn().
| void map::add_spawn | ( | const mtype_id & | type, |
| int | count, | ||
| const tripoint & | p, | ||
| bool | friendly = false, |
||
| int | faction_id = -1, |
||
| int | mission_id = -1, |
||
| const std::string & | name = "NONE" |
||
| ) | const |
Definition at line 5578 of file mapgen.cpp.
References detail::count(), debugmsg, friendly, get_submap_at(), MonsterGroupManager::monster_is_blacklisted(), my_MAPSIZE, name(), SEEX, SEEY, submap::spawns, type, tripoint::x, tripoint::y, and tripoint::z.
Referenced by jmapgen_monster::apply(), generate(), mission_start::kill_horde_master(), mapgen_ants_generic(), mapgen_ants_larvae(), mapgen_ants_queen(), mapgen_hive(), mapgen_road(), MapExtras::mx_collegekids(), MapExtras::mx_drugdeal(), MapExtras::mx_helicopter(), MapExtras::mx_house_spider(), MapExtras::mx_house_wasp(), MapExtras::mx_jabberwock(), MapExtras::mx_marloss_pilgrimage(), MapExtras::mx_military(), MapExtras::mx_roadblock(), MapExtras::mx_science(), MapExtras::mx_shia(), MapExtras::mx_spider(), mission_start::place_dog(), place_spawns(), mission_start::place_zombie_mom(), process_fields_in_submap(), and rotten_item_spawn().
| void map::add_splash | ( | const field_type_id & | type, |
| const tripoint & | center, | ||
| int | radius, | ||
| int | intensity | ||
| ) |
Definition at line 5510 of file map.cpp.
References add_splatter(), center, one_in(), points_in_radius(), trig_dist(), and type.
Referenced by smash_items().
| void map::add_splatter | ( | const field_type_id & | type, |
| const tripoint & | where, | ||
| int | intensity = 1 |
||
| ) |
Definition at line 5473 of file map.cpp.
References vehicle_part::blood, mod_field_intensity(), vehicle::part(), vehicle::part_displayed_at(), type, veh_at(), and vehicle::vehicle().
Referenced by add_splash(), add_splatter_trail(), Creature::bleed(), and mdeath::splatter().
| void map::add_splatter_trail | ( | const field_type_id & | type, |
| const tripoint & | from, | ||
| const tripoint & | to | ||
| ) |
Definition at line 5492 of file map.cpp.
References add_splatter(), impassable(), line_to(), and type.
Referenced by MapExtras::mx_casings(), MapExtras::mx_mayhem(), and MapExtras::mx_minefield().
| vehicle * map::add_vehicle | ( | const vgroup_id & | type, |
| const point & | p, | ||
| units::angle | dir, | ||
| int | init_veh_fuel = -1, |
||
| int | init_veh_status = -1, |
||
| bool | merge_wrecks = true |
||
| ) |
Definition at line 5606 of file mapgen.cpp.
References add_vehicle(), and type.
| vehicle * map::add_vehicle | ( | const vgroup_id & | type, |
| const tripoint & | p, | ||
| units::angle | dir, | ||
| int | init_veh_fuel = -1, |
||
| int | init_veh_status = -1, |
||
| bool | merge_wrecks = true |
||
| ) |
Definition at line 5600 of file mapgen.cpp.
References add_vehicle(), and type.
Referenced by add_vehicle(), VehicleFunction_json::apply(), jmapgen_vehicle::apply(), VehicleSpawnFunction::builtin_jackknifed_semi(), VehicleSpawnFunction::builtin_parkinglot(), VehicleSpawnFunction::builtin_pileup(), construct::done_vehicle(), draw_office_tower(), MapExtras::mx_helicopter(), MapExtras::mx_mayhem(), MapExtras::mx_minefield(), MapExtras::mx_roadblock(), MapExtras::mx_roadworks(), game::place_vehicle_nearby(), mission_start::ranch_scavenger_2(), spell_effect::spawn_summoned_vehicle(), iuse::unfold_generic(), and unfold_vehicle_iuse::use().
| vehicle * map::add_vehicle | ( | const vproto_id & | type, |
| const point & | p, | ||
| units::angle | dir, | ||
| int | init_veh_fuel = -1, |
||
| int | init_veh_status = -1, |
||
| bool | merge_wrecks = true |
||
| ) |
Definition at line 5612 of file mapgen.cpp.
References abs_sub, add_vehicle(), type, and tripoint::z.
| vehicle * map::add_vehicle | ( | const vproto_id & | type, |
| const tripoint & | p, | ||
| units::angle | dir, | ||
| int | init_veh_fuel = -1, |
||
| int | init_veh_status = -1, |
||
| bool | merge_wrecks = true |
||
| ) |
Definition at line 5618 of file mapgen.cpp.
References add_vehicle_to_cache(), add_vehicle_to_map(), dbg, debugmsg, get_cache(), get_submap_at_grid(), inbounds(), invalidate_max_populated_zlev(), submap::is_uniform, avatar_action::move(), ms_to_sm_remain(), point_zero, vehicle::sm_pos, string_format(), units::to_degrees(), tripoint::to_string(), type, submap::vehicles, Warn, tripoint::xy(), and tripoint::z.
| void map::add_vehicle_to_cache | ( | vehicle * | veh | ) |
Definition at line 266 of file map.cpp.
References debugmsg, vehicle::get_all_parts(), get_cache(), vehicle::global_part_pos3(), inbounds(), last_full_vehicle_list_dirty, level_cache::veh_cached_parts, level_cache::veh_exists_at, level_cache::veh_in_active_range, tripoint::x, tripoint::y, and tripoint::z.
Referenced by add_vehicle(), veh_interact::complete_vehicle(), displace_vehicle(), construct::done_vehicle(), loadn(), vehicle::part_removal_cleanup(), and reset_vehicle_cache().
|
private |
Takes a vehicle already created with new and attempts to place it on the map, checking for collisions.
If the vehicle can't be placed, returns NULL, otherwise returns a pointer to the placed vehicle, which may not necessarily be the one passed in (if wreckage is created by fusing cars).
| veh | The vehicle to place on the map. |
| merge_wrecks | Whether crashed vehicles become part of each other |
Definition at line 5669 of file mapgen.cpp.
References _, add_vehicle_to_map(), vehicle::all_parts_at_location(), destroy(), detach_vehicle(), vehicle::get_all_parts(), vehicle::global_part_pos3(), has_flag_ter(), impassable(), avatar_action::move(), vehicle::pos, om_direction::size, vehicle::sm_pos, TFLAG_DEEP_WATER, vehicle::type, veh_at(), veh_pointer_or_null(), and tripoint::xy().
Referenced by add_vehicle(), and add_vehicle_to_map().
|
inline |
Definition at line 1192 of file map.h.
References abs_sub, adjust_radiation(), and tripoint::z.
| void map::adjust_radiation | ( | const tripoint & | p, |
| int | delta | ||
| ) |
Increment the radiation in the given tile by the given delta (decrement it if delta is negative)
Definition at line 4035 of file map.cpp.
References submap::get_radiation(), get_submap_at(), inbounds(), and submap::set_radiation().
Referenced by adjust_radiation(), MapExtras::mx_crater(), MapExtras::mx_portal_in(), and process_fields_in_submap().
| float map::ambient_light_at | ( | const tripoint & | p | ) | const |
Definition at line 615 of file lightmap.cpp.
References get_cache_ref(), inbounds(), level_cache::lm, four_quadrants::max(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by apply_character_light(), and game::print_terrain_info().
| lit_level map::apparent_light_at | ( | const tripoint & | p, |
| const visibility_variables & | cache | ||
| ) | const |
Determine the visible light level for a tile, based on light_at for the tile, vision distance, etc.
| p | The tile on this map to draw. |
| cache | Currently cached visibility parameters |
Definition at line 698 of file lightmap.cpp.
References a, apparent_light_helper(), BLANK, BRIGHT, BRIGHT_ONLY, DARK, g, visibility_variables::g_light_level, get_cache_ref(), LIGHT_AMBIENT_LIT, LIGHT_SOURCE_BRIGHT, LIT, LOW, rl_dist(), visibility_variables::u_clairvoyance, visibility_variables::vision_threshold, tripoint::x, tripoint::y, and tripoint::z.
Referenced by game::draw_look_around_cursor(), game::print_all_tile_info(), editmap::update_view_with_help(), and update_visibility_cache().
|
static |
Helper function for light claculation; exposed here for map editor.
Definition at line 636 of file lightmap.cpp.
References level_cache::camera_cache, LIGHT_TRANSPARENCY_SOLID, lightmap_boundaries, level_cache::lm, four_quadrants::max(), NE, NW, point_east, point_north, point_north_east, point_north_west, point_south, point_south_east, point_south_west, point_west, SE, level_cache::seen_cache, SW, level_cache::transparency_cache, level_cache::vision_transparency_cache, point::x, tripoint::x, tripoint::xy(), point::y, and tripoint::y.
Referenced by apparent_light_at(), pl_sees(), and editmap::update_view_with_help().
|
protected |
Definition at line 196 of file lightmap.cpp.
References Character::active_light(), Creature::add_effect(), ambient_light_at(), apply_light_source(), effect_haslight, effect_onfire, Creature::has_effect(), LIGHT_AMBIENT_LOW, and Character::pos().
Referenced by generate_lightmap().
|
private |
Definition at line 1439 of file lightmap.cpp.
References accumulate_transparency(), castLight(), get_cache(), light_calc(), light_check(), MAPSIZE_X, MAPSIZE_Y, update_light_quadrants(), tripoint::xy(), and tripoint::z.
Referenced by generate_lightmap().
| void map::apply_faction_ownership | ( | const point & | p1, |
| const point & | p2, | ||
| const faction_id & | id | ||
| ) |
Definition at line 5494 of file mapgen.cpp.
References abs_sub, vehicle::has_owner(), i_at(), points_in_rectangle(), vehicle::set_owner(), veh_at(), veh_pointer_or_null(), and tripoint::z.
Referenced by jmapgen_faction::apply().
|
private |
Definition at line 1478 of file lightmap.cpp.
References apply_light_ray(), apply_light_source(), calc_ray_end(), units::cos(), units::fmod(), LIGHT_RANGE, LIGHT_SOURCE_LOCAL, LIGHTMAP_CACHE_X, LIGHTMAP_CACHE_Y, M_PI_2, M_SQRT2, units::sin(), trigdist, tripoint::x, and tripoint::y.
Referenced by add_light_from_items(), and generate_lightmap().
|
private |
Definition at line 1534 of file lightmap.cpp.
References a, default_, fastexp(), get_cache(), LIGHT_TRANSPARENCY_OPEN_AIR, LIGHT_TRANSPARENCY_SOLID, lightmap_boundaries, level_cache::lm, quadrant_from_x_y(), rl_dist(), square_dist(), level_cache::transparency_cache, point::x, tripoint::x, tripoint::xy(), point::y, tripoint::y, and tripoint::z.
Referenced by apply_light_arc().
|
private |
Definition at line 1359 of file lightmap.cpp.
References accumulate_transparency(), BRIGHT_ONLY, castLight(), get_cache(), inbounds(), light_calc(), light_check(), LIGHTMAP_CACHE_X, LOW, MAPSIZE_X, MAPSIZE_Y, coords::sm, update_light_quadrants(), point::x, tripoint::xy(), point::y, and tripoint::z.
Referenced by apply_character_light(), apply_light_arc(), and generate_lightmap().
| bash_results map::bash | ( | const tripoint & | p, |
| int | str, | ||
| bool | silent = false, |
||
| bool | destroy = false, |
||
| bool | bash_floor = false, |
||
| const vehicle * | bashing_vehicle = nullptr |
||
| ) |
Returns a pair where first is whether anything was smashed and second is if it was destroyed.
| p | Where to bash |
| str | How hard to bash |
| silent | Don't produce any sound |
| destroy | Destroys some otherwise unbashable tiles |
| bash_floor | Allow bashing the floor and the tile that supports it |
| bashing_vehicle | Vehicle that should NOT be bashed (because it is doing the bashing) |
Definition at line 3504 of file map.cpp.
References bash_field(), bash_items(), bash_ter_furn(), bash_vehicle(), destroy(), has_flag(), inbounds(), rng_float(), silent, veh_at(), and veh_pointer_or_null().
Referenced by jmapgen_setmap::apply(), bash_furn_success(), bash_resistance(), bash_strength(), bash_ter_furn(), bash_ter_success(), batter(), destroy(), destroy_furn(), drop_furniture(), drop_items(), game::fling_creature(), is_bashable(), game::knockback(), npc::move_to(), vehicle::part_collision(), route(), shoot(), mattack::shriek_stun(), smash(), and valid_move().
| bash_results map::bash_field | ( | const tripoint & | p, |
| const bash_params & | params | ||
| ) |
Definition at line 3594 of file map.cpp.
References fd_web, get_field(), and remove_field().
Referenced by bash().
| bash_results map::bash_furn_success | ( | const tripoint & | p, |
| const bash_params & | params | ||
| ) |
Definition at line 3284 of file map.cpp.
References bash(), map_data_common_t::bash, sounds::combat, fungal_effects::create_spores(), delete_signage(), map_bash_info::drop_group, cata::optional< T >::emplace(), explosion_handler::explosion(), f_null, furn(), furn_set(), map_bash_info::furn_set, g, get_sound_volume(), has_flag_furn(), i_at(), item_group::items_from(), int_id< T >::obj(), points_in_radius(), bash_params::silent, sounds::sound(), spawn_items(), map_bash_info::tent_centers, and calendar::turn.
Referenced by bash_ter_furn().
| bash_results map::bash_items | ( | const tripoint & | p, |
| const bash_params & | params | ||
| ) |
Definition at line 3542 of file map.cpp.
References _, item_contents::all_items_top(), sounds::combat, item::contents, has_items(), i_at(), one_in(), bash_params::silent, sounds::sound(), and spawn_items().
Referenced by bash().
|
inline |
Definition at line 1022 of file map.h.
References abs_sub, bash_rating(), and tripoint::z.
| int map::bash_rating | ( | int | str, |
| const tripoint & | p, | ||
| bool | allow_floor = false |
||
| ) | const |
Returns a success rating from -1 to 10 for a given tile based on a set strength, used for AI movement planning Values roughly correspond to 10% increment chances of success on a given bash, rounded down.
-1 means the square is not bashable
Definition at line 2470 of file map.cpp.
References bash_rating_internal(), dbg, furn(), furniture, inbounds(), int_id< T >::obj(), ter(), terrain, veh_at(), and Warn.
Referenced by bash_rating(), npc::can_move_to(), monster::move(), and npc::move_to().
|
private |
Definition at line 2362 of file map.cpp.
References furniture, cata::hash64_detail::ret, and terrain.
Referenced by bash_rating(), and route().
|
inline |
Definition at line 1016 of file map.h.
References abs_sub, bash_resistance(), and tripoint::z.
| int map::bash_resistance | ( | const tripoint & | p, |
| bool | allow_floor = false |
||
| ) | const |
Returns min_str of the furniture or terrain at p.
Definition at line 2456 of file map.cpp.
References bash(), map_data_common_t::bash, furn(), has_furn(), int_id< T >::obj(), map_bash_info::str_min, and ter().
Referenced by bash_resistance(), ranged::expected_coverage(), vehicle::part_collision(), rate_location(), smash(), and terrain_collision_data().
|
inline |
Definition at line 1011 of file map.h.
References abs_sub, bash_strength(), and tripoint::z.
| int map::bash_strength | ( | const tripoint & | p, |
| bool | allow_floor = false |
||
| ) | const |
Returns max_str of the furniture or terrain at p.
Definition at line 2442 of file map.cpp.
References bash(), map_data_common_t::bash, furn(), has_furn(), int_id< T >::obj(), map_bash_info::str_max, and ter().
Referenced by bash_strength(), ranged::expected_coverage(), game::fling_creature(), and terrain_collision_data().
| bash_results map::bash_ter_furn | ( | const tripoint & | p, |
| const bash_params & | params | ||
| ) |
Definition at line 3380 of file map.cpp.
References _, sounds::alarm, bash(), bash_params::bash_floor, bash_furn_success(), bash_ter_success(), sounds::combat, bash_params::destroy, furn(), furn_is_supported(), g, get_roof(), getabs(), has_flag(), impassable(), ms_to_sm_copy(), int_id< T >::obj(), rl_dist(), bash_params::roll, bash_params::silent, sounds::sound(), bash_params::strength, t_dirt, ter(), TFLAG_SUPPORTS_ROOF, TIMED_EVENT_WANTED, triggers_alarm, calendar::turn, tripoint::xy(), tripoint::z, and zlevels.
Referenced by bash(), bash_ter_success(), and explosion_handler::do_blast_new().
| bash_results map::bash_ter_success | ( | const tripoint & | p, |
| const bash_params & | params | ||
| ) |
Definition at line 3155 of file map.cpp.
References bash(), map_data_common_t::bash, bash_params::bash_floor, bash_ter_furn(), bash_ter_success(), bash_params::bashing_from_above, collapse_at(), sounds::combat, fungal_effects::create_spores(), debugmsg, bash_params::destroy, bash_params::do_recurse, explosion_handler::explosion(), g, get_roof(), get_sound_volume(), map_data_common_t::has_flag(), has_flag(), has_flag_ter(), ter_t::id, item_group::items_from(), int_id< T >::obj(), propagate_suspension_check(), ter_t::roof, bash_params::silent, sounds::sound(), spawn_items(), string_id< T >::str(), bash_results::success, t_dirt, t_open_air, ter(), ter_set(), TFLAG_INDOORS, TFLAG_SUPPORTS_ROOF, TFLAG_SUSPENDED, calendar::turn, tripoint::xy(), tripoint::z, and zlevels.
Referenced by bash_ter_furn(), bash_ter_success(), and shoot().
| bash_results map::bash_vehicle | ( | const tripoint & | p, |
| const bash_params & | params | ||
| ) |
Definition at line 3576 of file map.cpp.
References _, sounds::combat, DT_BASH, bash_params::silent, sounds::sound(), bash_params::strength, and veh_at().
Referenced by bash().
| void map::batter | ( | const tripoint & | p, |
| int | power, | ||
| int | tries = 1, |
||
| bool | silent = false |
||
| ) |
bash a square for a set number of times at set power.
Does not destroy
Definition at line 3641 of file map.cpp.
References bash(), detail::count(), silent, and behavior::success.
Definition at line 1043 of file map.cpp.
References debugmsg, g, Character::getID(), player::grab_point, Character::in_vehicle, Creature::is_avatar(), Character::name, optional_vpart_position::part_with_feature(), vehicle_part::passenger_flag, wrapped_vehicle::pos, Character::setpos(), unboard_vehicle(), veh_at(), VPFLAG_BOARDABLE, tripoint::x, and tripoint::y.
Referenced by npc::move_to(), game::phasing_move(), game::place_player(), and avatar_action::swim().
| bool map::build_floor_cache | ( | int | zlev | ) |
Definition at line 7862 of file map.cpp.
References debugmsg, get_cache(), get_submap_at_grid(), submap::get_ter(), MAPSIZE_X, MAPSIZE_Y, my_MAPSIZE, int_id< T >::obj(), OVERMAP_DEPTH, SEEX, SEEY, sx, sy, terrain, TFLAG_NO_FLOOR, TFLAG_SUN_ROOF_ABOVE, and zlevels.
Referenced by build_floor_caches(), and build_map_cache().
| void map::build_floor_caches | ( | ) |
Definition at line 7910 of file map.cpp.
References abs_sub, build_floor_cache(), OVERMAP_DEPTH, OVERMAP_HEIGHT, tripoint::z, and zlevels.
Referenced by game::do_turn().
| void map::build_map_cache | ( | int | zlev, |
| bool | skip_lightmap = false |
||
| ) |
Definition at line 8038 of file map.cpp.
References build_floor_cache(), build_outside_cache(), build_seen_cache(), build_transparency_cache(), build_vision_transparency_cache(), do_vehicle_caching(), fov_3d, g, generate_lightmap(), get_cache(), OVERMAP_DEPTH, OVERMAP_HEIGHT, level_cache::seen_cache_dirty, skew_vision_cache, update_suspension_cache(), and zlevels.
Referenced by game::do_turn(), game::draw(), game::look_around(), start_location::place_player(), game::start_game(), and game::update_map().
| void map::build_obstacle_cache | ( | const tripoint & | start, |
| const tripoint & | end, | ||
| float(&) | obstacle_cache[MAPSIZE_X][MAPSIZE_Y] | ||
| ) |
Definition at line 7810 of file map.cpp.
References inclusive_cuboid< Tripoint, >::contains(), get_submap_at_grid(), get_vehicles(), my_MAPSIZE, SEEX, SEEY, sx, sy, tripoint::x, tripoint::y, and tripoint::z.
| void map::build_outside_cache | ( | int | zlev | ) |
Definition at line 7756 of file map.cpp.
References get_cache(), get_submap_at_grid(), MAPSIZE_X, MAPSIZE_Y, my_MAPSIZE, SEEX, SEEY, sx, sy, and TFLAG_INDOORS.
Referenced by build_map_cache(), start_location::burn(), and start_location::prepare_map().
|
protected |
Calculates the Field Of View for the provided map from the given x, y coordinates.
Returns a lightmap for a result where the values represent a percentage of fully lit.
A value equal to or below 0 means that cell is not in the field of view, whereas a value equal to or above 1 means that cell is in the field of view.
| origin | the starting location |
| target_z | Z-level to draw light map on |
Definition at line 1224 of file lightmap.cpp.
References vpart_info::bonus, vehicle::camera_on, cast_zlight< float, sight_calc, sight_check, accumulate_transparency >(), vpart_info::durability, fov_3d, vehicle::get_avail_parts(), get_cache(), vehicle::global_part_pos3(), vpart_info::has_flag(), vehicle_part::hp(), LIGHT_TRANSPARENCY_OPEN_AIR, LIGHT_TRANSPARENCY_SOLID, MAPSIZE_X, MAPSIZE_Y, OVERMAP_DEPTH, OVERMAP_HEIGHT, vehicle::part(), vehicle::part_info(), rl_dist(), level_cache::seen_cache, square_dist(), veh_at(), VISIBILITY_FULL, VPFLAG_EXTENDS_VISION, tripoint::x, tripoint::xy(), and tripoint::y.
Referenced by build_map_cache().
|
protected |
Definition at line 218 of file lightmap.cpp.
References calc_max_populated_zlev(), clamp(), level_cache::floor_cache, g, get_cache(), get_cache_ref(), get_weather(), inbounds(), LIGHT_AMBIENT_DIM, LIGHT_AMBIENT_LOW, LIGHT_SOURCE_BRIGHT, LIGHT_TRANSPARENCY_OPEN_AIR, LIGHT_TRANSPARENCY_SOLID, level_cache::lm, MAPSIZE_X, MAPSIZE_Y, NE, NW, level_cache::outside_cache, OVERMAP_DEPTH, OVERMAP_HEIGHT, point_east, point_north, point_south, point_west, point_zero, SE, weather_type::sight_penalty, SW, level_cache::transparency_cache, weather_manager::weather_id, point::x, point::y, and zlevels.
Referenced by generate_lightmap().
|
protected |
Definition at line 81 of file lightmap.cpp.
References get_cache(), get_submap_at_grid(), get_weather(), field_entry::is_transparent(), LIGHT_TRANSPARENCY_OPEN_AIR, LIGHT_TRANSPARENCY_SOLID, MAPSIZE, MAPSIZE_X, MAPSIZE_Y, my_MAPSIZE, SEEX, SEEY, weather_type::sight_penalty, sm_to_ms_copy(), sx, sy, field_entry::translucency(), and weather_manager::weather_id.
Referenced by build_map_cache().
|
protected |
Definition at line 165 of file lightmap.cpp.
References CMM_CROUCH, coverage(), g, get_cache(), LIGHT_TRANSPARENCY_OPEN_AIR, LIGHT_TRANSPARENCY_SOLID, points_in_radius(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by build_map_cache().
|
private |
Definition at line 124 of file map_field.cpp.
References Creature::add_env_effect(), convert_bp(), Character::deal_damage(), DT_ACID, effect_corroding, time_duration::from_turns(), Character::get_armor_type(), field_entry::get_field_intensity(), rng(), and dealt_damage_instance::total_damage().
Referenced by player_in_field().
|
private |
Caclulate the greatest populated zlevel in the loaded submaps and save in the level cache.
fills the map::max_populated_zlev and returns it
Definition at line 8741 of file map.cpp.
References get_abs_sub(), get_submap_at_grid(), max_populated_zlev, my_MAPSIZE, OVERMAP_HEIGHT, coords::sm, sx, and sy.
Referenced by build_sunlight_cache().
Definition at line 1439 of file map.cpp.
References furn(), Character::is_mounted(), MF_RIDEABLE_MECH, Character::mounted_creature, furn_t::move_str_req, int_id< T >::obj(), wrapped_vehicle::pos, and Character::str_cur.
Referenced by grab().
|
inline |
| bool map::can_put_items | ( | const tripoint & | p | ) | const |
Definition at line 2292 of file map.cpp.
References can_put_items_ter_furn(), optional_vpart_position::part_with_feature(), and veh_at().
Referenced by can_put_items(), complete_construction(), haul(), and game::place_player().
|
inline |
Definition at line 948 of file map.h.
References abs_sub, can_put_items_ter_furn(), and tripoint::z.
| bool map::can_put_items_ter_furn | ( | const tripoint & | p | ) | const |
Definition at line 2301 of file map.cpp.
References has_flag().
Referenced by can_put_items(), can_put_items_ter_furn(), and rcdrive().
See trap::can_see, which is called for the trap here.
Definition at line 5114 of file map.cpp.
References c, trap::can_see(), and tr_at().
Referenced by can_examine_at(), and vehicle::autodrive_controller::check_drivable().
|
inline |
Definition at line 474 of file map.h.
References get_cache(), level_cache::map_memory_seen_cache, MAPSIZE_Y, tripoint::x, tripoint::y, and tripoint::z.
Referenced by draw_maptile().
|
inline |
Definition at line 469 of file map.h.
References get_cache(), level_cache::map_memory_seen_cache, MAPSIZE_Y, tripoint::x, tripoint::y, and tripoint::z.
| std::vector< tripoint > map::check_submap_active_item_consistency | ( | ) |
Definition at line 4556 of file map.cpp.
References abs_sub, submap::active_items, active_item_cache::get(), get_submap_at_grid(), map(), MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, point_zero, submaps_with_active_items, and tripoint::xy().
| bool map::check_vehicle_zones | ( | int | zlev | ) |
| bool map::clear_path | ( | const tripoint & | f, |
| const tripoint & | t, | ||
| int | range, | ||
| int | cost_min, | ||
| int | cost_max | ||
| ) | const |
Check whether there's a direct line of sight between F and T with the additional movecost restraints.
Checks two things:
sees() algorithm between F and Tcost_min and cost_max. Definition at line 6364 of file map.cpp.
References bresenham(), fov_3d, inbounds(), rl_dist(), tripoint::xy(), and tripoint::z.
Referenced by points_for_gas_cloud(), process_fields_in_submap(), game::start_game(), and vehicle_selector::vehicle_selector().
| void map::clear_spawns | ( | ) |
| void map::clear_traps | ( | ) |
| void map::clear_vehicle_cache | ( | ) |
Definition at line 308 of file map.cpp.
References abs_sub, get_cache(), inbounds(), OVERMAP_DEPTH, OVERMAP_HEIGHT, level_cache::veh_cached_parts, level_cache::veh_exists_at, level_cache::veh_in_active_range, tripoint::z, and zlevels.
Referenced by game::place_player_overmap(), reset_vehicle_cache(), rotate(), shift(), and game::vertical_shift().
| void map::clear_vehicle_list | ( | int | zlev | ) |
Definition at line 326 of file map.cpp.
References get_cache(), and last_full_vehicle_list_dirty.
Referenced by editmap::mapgen_veh_destroy(), game::place_player_overmap(), rotate(), and shift().
Definition at line 290 of file map.cpp.
References debugmsg, get_cache(), inbounds(), level_cache::veh_cached_parts, level_cache::veh_exists_at, tripoint::x, tripoint::y, and tripoint::z.
Referenced by vehicle::advance_precalc_mounts(), veh_interact::complete_vehicle(), and vehicle::part_removal_cleanup().
| int map::climb_difficulty | ( | const tripoint & | p | ) | const |
Checks 3x3 block centered on p for terrain to climb.
Definition at line 1963 of file map.cpp.
References debugmsg, has_flag(), impassable_ter_furn(), OVERMAP_DEPTH, OVERMAP_HEIGHT, points_in_radius(), TFLAG_RAMP, TFLAG_RAMP_DOWN, TFLAG_RAMP_UP, veh_at(), tripoint::x, tripoint::y, and tripoint::z.
| void map::clip_to_bounds | ( | int & | x, |
| int & | y | ||
| ) | const |
| void map::clip_to_bounds | ( | int & | x, |
| int & | y, | ||
| int & | z | ||
| ) | const |
Definition at line 8699 of file map.cpp.
References clip_to_bounds(), OVERMAP_DEPTH, and OVERMAP_HEIGHT.
| void map::clip_to_bounds | ( | tripoint & | p | ) | const |
Clips the coordinates of p to fit the map bounds.
Definition at line 8679 of file map.cpp.
References clip_to_bounds(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by MapgenRemovePartHandler::add_item_or_charges(), clip_to_bounds(), and route().
| bool map::close_door | ( | const tripoint & | p, |
| bool | inside, | ||
| bool | check_only | ||
| ) |
Definition at line 3951 of file map.cpp.
References _, furn(), furn_set(), has_flag(), int_id< T >::id(), sounds::movement, int_id< T >::obj(), sounds::sound(), string_id< T >::str(), ter(), and ter_set().
Referenced by doors::close_door(), and game::try_get_right_click_action().
| void map::collapse_at | ( | const tripoint & | p, |
| bool | silent, | ||
| bool | was_supporting = false, |
||
| bool | destroy_pos = true |
||
| ) |
Causes a collapse at p, such as from destroying a wall.
Definition at line 2891 of file map.cpp.
References collapse_at(), collapse_check(), crush(), destroy(), f_null, furn_set(), has_flag(), make_rubble(), one_in(), points_in_radius(), propagate_suspension_check(), silent, t_open_air, ter_set(), TFLAG_COLLAPSES, TFLAG_SUPPORTS_ROOF, TFLAG_WALL, and zlevels.
Referenced by bash_ter_success(), collapse_at(), and talk_function::loot_building().
| int map::collapse_check | ( | const tripoint & | p | ) |
Checks if a square should collapse, returns the X for the one_in(X) collapse chance.
Definition at line 2842 of file map.cpp.
References has_flag(), OVERMAP_DEPTH, points_in_radius(), TFLAG_COLLAPSES, TFLAG_SUPPORTS_ROOF, TFLAG_WALL, tripoint::xy(), and tripoint::z.
Referenced by collapse_at().
| void map::collapse_invalid_suspension | ( | const tripoint & | point | ) |
Triggers a recursive collapse of suspended tiles based on their support validity.
Definition at line 2945 of file map.cpp.
References f_null, furn_set(), is_suspension_valid(), propagate_suspension_check(), t_open_air, and ter_set().
Referenced by drop_everything(), and propagate_suspension_check().
| int map::combined_movecost | ( | const tripoint & | from, |
| const tripoint & | to, | ||
| const vehicle * | ignored_vehicle = nullptr, |
||
| int | modifier = 0, |
||
| bool | flying = false, |
||
| bool | via_ramp = false |
||
| ) | const |
Cost to move out of one tile and into the next.
from and into to Definition at line 1832 of file map.cpp.
References move_cost(), trigdist, valid_move(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by npc::move_away_from(), npc::move_to(), and game::walk_move().
Definition at line 5524 of file map.cpp.
References get_submap_at(), inbounds(), and coords::sm.
Referenced by mission_start::reveal_lab_train_depot(), and game::use_computer().
Definition at line 7369 of file map.cpp.
References get_nonant(), get_submap_at_grid(), and setsubmap().
Referenced by shift().
Check if the creature could see items at p if there were any items.
This is similar to sees_some_items, but it does not check that there are actually any items.
Definition at line 4749 of file map.cpp.
References could_see_items(), and Creature::pos().
Referenced by could_see_items(), game::print_items_info(), and sees_some_items().
Definition at line 4754 of file map.cpp.
References has_flag_ter_or_furn(), TFLAG_SEALED, tripoint::x, tripoint::y, and tripoint::z.
| int map::coverage | ( | const tripoint & | p | ) | const |
Returns coverage value of the tile.
Definition at line 6214 of file map.cpp.
References map_data_common_t::coverage, furn(), ter(), veh_at(), and VPFLAG_AISLE.
Referenced by build_vision_transparency_cache(), and game::print_terrain_info().
|
inline |
Definition at line 1361 of file map.h.
References abs_sub, create_anomaly(), and tripoint::z.
| void map::create_anomaly | ( | const tripoint & | p, |
| artifact_natural_property | prop, | ||
| bool | create_rubble = true |
||
| ) |
Definition at line 6320 of file mapgen.cpp.
References abs_sub, add_field(), ARTPROP_BREATHING, ARTPROP_CRACKLING, ARTPROP_DEAD, ARTPROP_ELECTRIC, ARTPROP_ENGRAVED, ARTPROP_FRACTAL, ARTPROP_GLITTERING, ARTPROP_GLOWING, ARTPROP_HUMMING, ARTPROP_ITCHY, ARTPROP_MAX, ARTPROP_MOVING, ARTPROP_NULL, ARTPROP_RATTLING, ARTPROP_SCALED, ARTPROP_SLIMY, ARTPROP_WARM, ARTPROP_WHISPERING, ARTPROP_WRIGGLING, c, create_anomaly(), f_null, f_rubble, fd_acid_vent, fd_fire_vent, fd_push_items, fd_shock_vent, furn(), furn_set(), GROUP_BREATHER, GROUP_BREATHER_HUB, mtrap_set(), one_in(), place_spawns(), rl_dist(), rng(), rough_circle(), rough_circle_furn(), set_radiation(), spawn_item(), t_dirt, tr_drain, tr_glow, tr_hum, tr_shadow, tr_snake, tripoint::xy(), and tripoint::z.
Referenced by create_anomaly(), debug_menu::debug(), draw_lab(), and MapExtras::mx_portal_in().
| void map::create_burnproducts | ( | const tripoint & | p, |
| const item & | fuel, | ||
| const units::mass & | burned_mass | ||
| ) |
Definition at line 96 of file map_field.cpp.
References base_camps::id, item::made_of(), spawn_item(), calendar::turn, and item::typeId().
Referenced by MapExtras::burned_ground_parser(), and process_fields_in_submap().
|
private |
Definition at line 361 of file map_field.cpp.
References add_field(), debugmsg, fd_hot_air1, fd_hot_air2, fd_hot_air3, fd_hot_air4, and rng().
Referenced by process_fields_in_submap().
| void map::creature_in_field | ( | Creature & | critter | ) |
Apply field effects to the creature when it's on a square with fields.
Definition at line 1559 of file map_field.cpp.
References Creature::add_effect(), Creature::add_env_effect(), Creature::add_msg_player_or_npc(), Creature::as_player(), field_entry::field_effects(), get_field(), field_entry::get_field_type(), effect::get_id(), Character::in_vehicle, field_entry::is_field_alive(), Creature::is_immune_effect(), Creature::is_immune_field(), Creature::is_monster(), monster_in_field(), one_in(), player_in_field(), Creature::pos(), Character::pos(), and veh_at().
Referenced by add_field(), game::do_turn(), game::monmove(), npc::move_to(), and game::place_player().
| void map::creature_on_trap | ( | Creature & | critter, |
| bool | may_avoid = true |
||
| ) |
Apply trap effects to the creature, similar to creature_in_field.
If there is no trap at the creatures location, nothing is done. If the creature can avoid the trap, nothing is done as well. Otherwise the trap is triggered.
| critter | Creature that just got trapped |
| may_avoid | If true, the creature tries to avoid the trap (Creature::avoid_trap). If false, the trap is always triggered. |
Definition at line 8289 of file map.cpp.
References c, Character::in_vehicle, and tr_at().
Referenced by game::fling_creature(), npc::move_to(), game::phasing_move(), game::place_player(), smash(), and game::vertical_move().
| void map::crush | ( | const tripoint & | p | ) |
Definition at line 3649 of file map.cpp.
References _, Creature::add_effect(), player::add_msg_player_or_npc(), Creature::check_dead_state(), Character::deal_damage(), DT_BASH, effect_crushed, g, Character::in_vehicle, m_bad, num_bp, rng(), and veh_at().
Referenced by collapse_at().
| bool map::dangerous_field_at | ( | const tripoint & | p | ) |
Definition at line 5379 of file map.cpp.
References field_at().
|
protected |
Definition at line 7248 of file map.cpp.
References field_at(), and rng().
Referenced by actualize().
| void map::decay_fields_and_scent | ( | const time_duration & | amount | ) |
Moved here from weather.cpp for speed.
Decays fire, washable fields and scent. Washable fields are decayed only by 1/3 of the amount fire is.
Definition at line 2656 of file map.cpp.
References abs_sub, dbg, Error, level_cache::field_cache, submap::field_count, g, get_cache(), get_cache_ref(), field_entry::get_field_age(), field_entry::get_field_type(), get_submap_at_grid(), MAPSIZE, my_MAPSIZE, level_cache::outside_cache, SEEX, SEEY, field_entry::set_field_age(), sx, sy, type, and tripoint::z.
| void map::delete_graffiti | ( | const tripoint & | p | ) |
Definition at line 7674 of file map.cpp.
References submap::delete_graffiti(), get_submap_at(), and inbounds().
| void map::delete_signage | ( | const tripoint & | p | ) | const |
Definition at line 3999 of file map.cpp.
References submap::delete_signage(), get_submap_at(), and inbounds().
Referenced by bash_furn_success(), and talk_function::loot_building().
| bool map::deregister_vehicle_zone | ( | zone_data & | zone | ) |
Definition at line 957 of file map.cpp.
References zone_data::get_start_point(), getlocal(), optional_vpart_position::part_with_feature(), and veh_at().
| void map::destroy | ( | const tripoint & | p, |
| bool | silent = false |
||
| ) |
Keeps bashing a square until it can't be bashed anymore.
Definition at line 3615 of file map.cpp.
References bash(), detail::count(), impassable(), silent, and behavior::success.
Referenced by add_vehicle_to_map(), bash(), MapExtras::burned_ground_parser(), collapse_at(), draw_lab(), make_rubble(), MapExtras::mx_crater(), MapExtras::mx_helicopter(), MapExtras::mx_supplydrop(), om_cutdown_trees(), activity_handlers::pickaxe_finish(), and process_fields_in_submap().
| void map::destroy_furn | ( | const tripoint & | p, |
| bool | silent = false |
||
| ) |
Keeps bashing a square until there is no more furniture.
Definition at line 3631 of file map.cpp.
References bash(), detail::count(), f_null, furn(), silent, and behavior::success.
Referenced by make_rubble().
| void map::destroy_vehicle | ( | vehicle * | veh | ) |
Definition at line 395 of file map.cpp.
References detach_vehicle().
Referenced by vehicle::act_on_map(), MapExtras::burned_ground_parser(), veh_interact::complete_vehicle(), vehicle::merge_rackable_vehicle(), MapExtras::mx_burned_ground(), and vehicle::part_removal_cleanup().
Definition at line 349 of file map.cpp.
References abs_sub, debugmsg, vehicle::detach(), dirty_vehicle_list, vehicle::get_avail_parts(), get_cache(), get_submap_at_grid(), vehicle::invalidate_towing(), avatar_action::move(), vehicle::name, overmap_buffer, OVERMAP_HEIGHT, vehicle::refresh_position(), overmapbuffer::remove_vehicle(), reset_vehicle_cache(), vehicle::sm_pos, vehicle::tracking_on, unboard_vehicle(), level_cache::vehicle_list, submap::vehicles, VPFLAG_BOARDABLE, tripoint::x, tripoint::y, tripoint::z, and level_cache::zone_vehicles.
Referenced by add_vehicle_to_map(), destroy_vehicle(), and editmap::mapgen_veh_destroy().
|
private |
Definition at line 7705 of file map.cpp.
References map_data_common_t::connect_group, anonymous_namespace{overmap_connection.cpp}::connections, get_known_connections(), LINE_OOXX, LINE_OXOX, LINE_OXXO, LINE_OXXX, LINE_XOOX, LINE_XOXO, LINE_XOXX, LINE_XXOO, LINE_XXOX, LINE_XXXO, LINE_XXXX, int_id< T >::obj(), map_data_common_t::symbol(), and ter().
Referenced by draw_from_above(), and draw_maptile().
| void map::disarm_trap | ( | const tripoint & | p | ) |
Definition at line 5197 of file map.cpp.
References _, add_msg(), debugmsg, g, trap::get_avoidance(), trap::get_difficulty(), trap::is_null(), m_bad, MORALE_ACCOMPLISHMENT, MORALE_FAILURE, trap::name(), trap::on_disarmed(), rng(), skill_traps, tr_at(), trap::trigger(), tripoint::x, tripoint::y, and tripoint::z.
| std::string map::disp_name | ( | const tripoint & | p | ) |
Definition at line 1324 of file map.cpp.
References _, name(), and string_format().
Referenced by vehicle::part_collision().
Definition at line 1113 of file map.cpp.
References add_msg(), add_vehicle_to_cache(), vehicle::advance_precalc_mounts(), vehicle::check_is_heli_landed(), dbg, debugmsg, Error, g, get_cache(), vehicle::get_riders(), get_submap_at(), vehicle::global_part_pos3(), vehicle::global_pos3(), grid, inbounds(), invalidate_max_populated_zlev(), Creature::is_avatar(), submap::is_uniform, m_debug, avatar_action::move(), vehicle::name, on_vehicle_moved(), vehicle::part(), vehicle_part::passenger_flag, Creature::pos(), Creature::posx(), Creature::posy(), Creature::posz(), vehicle_part::precalc, vehicle::remote_controlled(), vehicle_part::remove_flag(), SEEX, SEEY, vehicle::set_submap_moved(), Creature::setpos(), vehicle::shed_loose_parts(), vehicle::stop(), update_vehicle_list(), level_cache::vehicle_list, submap::vehicles, tripoint::x, tripoint::y, tripoint::z, level_cache::zone_vehicles, and vehicle::zones_dirty.
Referenced by game::grabbed_veh_move(), and move_vehicle().
| bool map::displace_water | ( | const tripoint & | dp | ) |
Definition at line 1273 of file map.cpp.
References has_flag(), impassable_ter_furn(), points_in_radius(), rng(), t_dirt, t_water_dp, t_water_moving_dp, t_water_moving_sh, t_water_sh, ter(), ter_set(), and TFLAG_DEEP_WATER.
Referenced by move_vehicle().
| void map::do_vehicle_caching | ( | int | z | ) |
Definition at line 8021 of file map.cpp.
References vehicle::get_all_parts(), get_cache(), vehicle::global_part_pos3(), inbounds(), OVERMAP_HEIGHT, vehicle_caching_internal(), vehicle_caching_internal_above(), level_cache::vehicle_list, tripoint::xy(), and tripoint::z.
Referenced by build_map_cache().
| bool map::dont_draw_lower_floor | ( | const tripoint & | p | ) |
Definition at line 5833 of file map.cpp.
References has_flag(), OVERMAP_DEPTH, TFLAG_NO_FLOOR, TFLAG_Z_TRANSPARENT, tripoint::z, and zlevels.
| void map::draw | ( | const catacurses::window & | w, |
| const tripoint & | center | ||
| ) |
Draw a visible part of the map into w.
This method uses g->u.posx()/posy() for visibility calculations, so it can not be used for anything but the player's viewport. Likewise, only g->m and maps with equivalent coordinates can be used, as other maps would have coordinate systems incompatible with g->u.posx()
| w | Window we are drawing in |
| center | The coordinate of the center of the viewport, this can be different from the player coordinate. |
Definition at line 5674 of file map.cpp.
References BRIGHT, drawsq_params::bright_light(), c_black, c_brown, c_light_gray, c_magenta, c_pink, center, overmap_ui::display(), draw_from_above(), draw_maptile(), g, get_cache_ref(), get_memory_at(), get_visibility(), get_visibility_variables_cache(), catacurses::getmaxx(), catacurses::getmaxy(), has_memory_at(), inbounds(), is_draw_tiles_mode(), LOW, drawsq_params::low_light(), MAPSIZE_X, MAPSIZE_Y, maptile_at_internal(), drawsq_params::memorize(), drawsq_params::output(), tripoint_above, update_visibility_cache(), VIS_BOOMER, VIS_BOOMER_DARK, VIS_CLEAR, VIS_DARK, VIS_HIDDEN, VIS_LIT, level_cache::visibility_cache, catacurses::wmove(), wputch(), tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by game::draw_ter().
|
protected |
Definition at line 5025 of file mapgen.cpp.
References mapgendata::groundcover(), SEEX, SEEY, t_dirtmound, t_slope_down, ter_set(), and mapgendata::terrain_type().
Referenced by draw_map().
Definition at line 8256 of file map.cpp.
References draw_circle(), furn_set(), and type.
Referenced by circle_furn().
|
protected |
Definition at line 5235 of file mapgen.cpp.
References mapgendata::above(), connects_to(), mapgendata::east(), oter_t::has_flag(), has_sidewalk, is_ot_match(), mapgendata::north(), oter_id, random_point(), resolve_regional_terrain_and_furniture(), rng(), rotate(), SEEX, SEEY, mapgendata::south(), t_dirt, t_door_metal_c, t_grass, t_ladder_up, mapgendata::t_nesw, t_rock_floor, t_sewage, t_shrub, t_sidewalk, t_slope_up, ter(), ter_set(), mapgendata::terrain_type(), terrain_type_to_nesw_array(), type, and mapgendata::west().
Referenced by draw_map().
| void map::draw_fill_background | ( | const ter_id & | type | ) |
Definition at line 8171 of file map.cpp.
References abs_sub, get_submap_at_grid(), my_MAPSIZE, set_outside_cache_dirty(), set_pathfinding_cache_dirty(), set_seen_cache_dirty(), set_transparency_cache_dirty(), coords::sm, type, and tripoint::z.
Referenced by fill_background(), mapgendata::fill_groundcover(), mapgen_function_json::generate(), and mapgen_forest().
| void map::draw_fill_background | ( | const weighted_int_list< ter_id > & | f | ) |
Definition at line 8193 of file map.cpp.
References draw_square_ter(), my_MAPSIZE, point_zero, SEEX, and SEEY.
| void map::draw_fill_background | ( | ter_id(*)() | f | ) |
Definition at line 8189 of file map.cpp.
References draw_square_ter(), my_MAPSIZE, point_zero, SEEX, and SEEY.
|
private |
Draws the tile as seen from above.
Definition at line 6030 of file map.cpp.
References BOOMERED, drawsq_params::bright_light(), c_black_cyan, c_cyan, c_dark_gray, c_light_gray, c_light_gray_cyan, c_light_green, c_magenta, c_white, map_data_common_t::color(), cyan_background(), DARKNESS, determine_wall_corner(), tileray::dir_symbol(), vehicle::face, g, maptile::get_furn_t(), maptile::get_ter_t(), map_data_common_t::has_flag(), drawsq_params::highlight(), invert_color(), drawsq_params::low_light(), map_data_common_t::movecost, NV_GOGGLES, vpart_position::obstacle_at_part(), drawsq_params::output(), vehicle::part_sym(), vehicle::roof_at_part(), special_symbol(), map_data_common_t::symbol(), TFLAG_AUTO_WALL_SYMBOL, TFLAG_NO_FLOOR, TFLAG_RAMP, TFLAG_SEEN_FROM_ABOVE, veh_at_internal(), and wputch().
|
protected |
Definition at line 3515 of file mapgen.cpp.
References _, mapgendata::above(), abs_sub, add_computer(), computer::add_failure(), add_field(), add_item_or_charges(), computer::add_option(), ARTPROP_BREATHING, ARTPROP_CRACKLING, ARTPROP_GLOWING, ARTPROP_SCALED, ARTPROP_WARM, ARTPROP_WHISPERING, center, item::charges, COMPACT_CASCADE, COMPACT_LIST_BIONICS, COMPACT_PORTAL, COMPACT_RELEASE, COMPACT_TERMINATE, COMPFAIL_MANHACKS, COMPFAIL_SECUBOTS, connects_to(), contains, create_anomaly(), debugmsg, destroy(), dice(), draw_circle(), draw_rough_circle(), mapgendata::east(), EAST_EDGE, f_counter, f_flower_fungal, f_fungal_clump, f_null, f_rack, f_rubble_rock, f_table, fd_gas_vent, fd_smoke_vent, furn(), furn_set(), mapgen_factory::generate(), get_abs_sub(), GROUP_FUNGI_FUNGALOID, GROUP_HAZMATBOT, GROUP_LAB, GROUP_NETHER, GROUP_ROBOT_SECUBOT, GROUP_TURRET, has_flag(), has_flag_furn(), has_flag_ter(), i_clear(), trap::is_null(), is_ot_match(), line(), make_rubble(), mtrap_set(), mapgendata::north(), one_in(), oter_mapgen, place_items(), place_spawns(), point_west, point_zero, points_in_rectangle(), prefix, random_entry(), random_point(), rng(), rotate(), science_room(), SEEX, SEEY, computer::set_access_denied_msg(), set_radiation(), set_temperature(), mapgendata::south(), SOUTH_EDGE, spawn_item(), square_furn(), calendar::start_of_cataclysm, t_bars, t_card_science, t_concrete_wall, t_console, t_cvdbody, t_cvdmachine, t_dirt, t_door_glass_frosted_c, t_door_metal_c, t_door_metal_locked, t_floor, t_fungus_floor_in, t_fungus_wall, t_marloss, t_radio_tower, t_reinforced_door_glass_c, t_reinforced_glass, t_rock_floor, t_sewage, t_slime, t_stairs_down, t_stairs_up, t_strconc_floor, t_thconc_floor, t_thconc_floor_olight, t_water_sh, ter(), ter_set(), terrain, mapgendata::terrain_type(), tr_at(), tr_dissector, tr_portal, trap_set(), type, mapgendata::west(), tripoint::z, and mapgendata::zlevel().
Referenced by draw_map().
Definition at line 8164 of file map.cpp.
References draw_line(), furn_set(), and type.
Referenced by jmapgen_setmap::apply(), and line_furn().
|
protected |
Definition at line 2884 of file mapgen.cpp.
References string_id< T >::c_str(), contains, debugmsg, draw_anthill(), draw_connections(), draw_lab(), draw_mine(), draw_office_tower(), draw_slimepit(), draw_temple(), draw_triffid(), fill_background(), oter_t::get_mapgen_id(), oter_t::get_name(), int_id< T >::id(), is_ot_match(), prefix, run_mapgen_func(), t_floor, and mapgendata::terrain_type().
Referenced by generate().
|
private |
Internal version of the drawsq.
Keeps a cached maptile for less re-getting. Returns false if it has drawn all it should, true if draw_from_above should be called after.
Definition at line 5839 of file map.cpp.
References BOOMERED, drawsq_params::bright_light(), c_black, c_dark_gray, c_light_green, c_magenta, c_white, trap::can_see(), check_and_set_seen_cache(), field_entry::color(), item::color(), map_data_common_t::color(), trap::color, DARKNESS, determine_wall_corner(), tileray::dir_symbol(), field::displayed_field_type(), vehicle::face, field::field_count(), field::find_field(), vehicle::forward_velocity(), g, maptile::get_field(), maptile::get_furn_t(), maptile::get_item_count(), field_type::get_symbol(), maptile::get_ter_t(), maptile::get_trap(), maptile::get_uppermost_item(), getabs(), map_data_common_t::has_flag(), maptile::has_graffiti(), drawsq_params::highlight(), hilite(), furn_t::id, invert_color(), drawsq_params::low_light(), drawsq_params::memorize(), NV_GOGGLES, int_id< T >::obj(), drawsq_params::output(), OVERMAP_DEPTH, vehicle::part_color(), vehicle::part_sym(), vehicle::player_in_control(), field_type::priority, red_background(), rng(), sees_some_items(), drawsq_params::show_items(), special_symbol(), trap::sym, item::symbol(), map_data_common_t::symbol(), TFLAG_AUTO_WALL_SYMBOL, TFLAG_DEEP_WATER, TFLAG_NO_FLOOR, TFLAG_SWIMMABLE, veh_at_internal(), wprintz(), wputch(), tripoint::z, and zlevels.
|
protected |
Definition at line 4762 of file mapgen.cpp.
References mapgendata::above(), abs_sub, add_field(), add_item(), mapgendata::e_fac, EAST, mapgendata::east(), EAST_EDGE, f_wreckage, fd_gas_vent, GROUP_DOG_THING, is_ot_match(), line(), item::make_corpse(), make_rubble(), move_cost(), mapgendata::n_fac, NORTH, mapgendata::north(), num, one_in(), open(), place_items(), place_spawns(), prefix, random_entry(), random_point(), rng(), mapgendata::s_fac, SEEX, SEEY, SOUTH, mapgendata::south(), SOUTH_EDGE, spawn_artifact(), square(), calendar::start_of_cataclysm, t_lava, t_rock, t_rock_floor, t_slope_down, t_slope_up, ter(), ter_set(), mapgendata::terrain_type(), mapgendata::w_fac, WEST, mapgendata::west(), point::x, point::y, and tripoint::z.
Referenced by draw_map().
|
protected |
Definition at line 2927 of file mapgen.cpp.
References add_vehicle(), mapgendata::east(), EAST_EDGE, f_bench, f_bookcase, f_chair, f_counter, f_crate_c, f_desk, f_fridge, f_indoor_plant, f_locker, f_null, f_rack, f_sink, f_table, f_toilet, mapgendata::fill_groundcover(), mapf::formatted_set_simple(), mapf::furn_bind(), GROUP_PLAIN, GROUP_ZOMBIE, GROUP_ZOMBIE_COP, mapgendata::monster_density(), mapgendata::north(), one_in(), place_items(), place_spawns(), point_zero, rng(), rotate(), mapgendata::south(), SOUTH_EDGE, spawn_item(), calendar::start_of_cataclysm, t_console, t_console_broken, t_door_c, t_door_glass_c, t_door_locked, t_door_locked_alarm, t_door_metal_locked, t_elevator, t_floor, t_pavement, t_pavement_y, t_railing, t_rock, t_shrub, t_sidewalk, t_stairs_down, t_stairs_up, t_wall, t_wall_glass, t_window, mapf::ter_bind(), mapgendata::terrain_type(), mapgendata::west(), and x_in_y().
Referenced by draw_map().
Definition at line 8235 of file map.cpp.
References draw_rough_circle(), furn_set(), and type.
Referenced by rough_circle_furn().
Definition at line 8228 of file map.cpp.
References draw_rough_circle(), ter_set(), and type.
Referenced by rough_circle().
|
protected |
Definition at line 5043 of file mapgen.cpp.
References mapgendata::above(), mapgendata::e_fac, EAST_EDGE, GROUP_BLOB, is_ot_match(), mapgendata::n_fac, one_in(), place_items(), place_spawns(), point_zero, prefix, rng(), mapgendata::s_fac, SEEX, SEEY, SOUTH_EDGE, calendar::start_of_cataclysm, t_dirt, t_rock_floor, t_slime, t_slope_down, t_slope_up, ter_set(), mapgendata::terrain_type(), mapgendata::w_fac, and mapgendata::zlevel().
Referenced by draw_map().
Definition at line 8205 of file map.cpp.
References draw_square(), furn_set(), and type.
Referenced by jmapgen_setmap::apply(), mission_start::ranch_nurse_1(), mission_start::ranch_nurse_2(), mission_start::ranch_nurse_7(), mission_start::ranch_nurse_8(), and square_furn().
Definition at line 8198 of file map.cpp.
References draw_square(), ter_set(), and type.
Referenced by jmapgen_setmap::apply(), draw_fill_background(), talk_function::field_build_1(), talk_function::field_build_2(), talk_function::field_plant(), mission_start::ranch_nurse_3(), mission_start::ranch_nurse_4(), mission_start::ranch_nurse_5(), mission_start::ranch_nurse_6(), mission_start::ranch_nurse_7(), mission_start::ranch_scavenger_1(), mission_start::ranch_scavenger_2(), mission_start::ranch_scavenger_3(), square(), and mapgendata::square_groundcover().
| void map::draw_square_ter | ( | const weighted_int_list< ter_id > & | f, |
| const point & | p1, | ||
| const point & | p2 | ||
| ) |
Definition at line 8219 of file map.cpp.
References draw_square(), weighted_list< W, T >::pick(), t_null, and ter_set().
|
protected |
Definition at line 4516 of file mapgen.cpp.
References mapgendata::above(), abs_sub, action, add_field(), EAST_EDGE, fd_fire_vent, fill_background(), GROUP_SEWER, line(), mtrap_set(), one_in(), place_spawns(), point_zero, random_entry(), random_entry_removed(), rng(), SEEX, SEEY, SOUTH_EDGE, spawn_artifact(), square(), t_bars, t_dirt, t_floor_blue, t_floor_green, t_floor_red, t_grate, t_pedestal_temple, t_rock, t_rock_blue, t_rock_floor, t_rock_green, t_rock_red, t_stairs_down, t_stairs_up, t_switch_even, t_switch_gb, t_switch_rb, t_switch_rg, t_water_dp, ter(), ter_set(), mapgendata::terrain_type(), anonymous_namespace{overmap.cpp}::terrains, tr_temple_flood, tr_temple_toggle, point::x, point::y, tripoint::y, tripoint::z, and mapgendata::zlevel().
Referenced by draw_map().
|
protected |
Definition at line 5087 of file mapgen.cpp.
References abs_sub, add_field(), detail::digits::done, EAST, EAST_EDGE, fd_web, fill_background(), GROUP_SPIDER, GROUP_TRIFFID, GROUP_TRIFFID_HEART, GROUP_TRIFFID_OUTER, avatar_action::move(), NORTH, one_in(), place_spawns(), point_south_east, random_entry(), rng(), rotate(), SOUTH, SOUTH_EDGE, square(), t_dirt, t_root_wall, t_slope_down, t_slope_up, ter(), ter_set(), mapgendata::terrain_type(), WEST, point::x, point::y, and tripoint::z.
Referenced by draw_map().
| void map::drawsq | ( | const catacurses::window & | w, |
| const tripoint & | p, | ||
| const drawsq_params & | params | ||
| ) | const |
Draw the map tile at the given coordinate.
Called by map::draw().
| w | The window we are drawing in |
| p | The tile on this map to draw. |
| params | Draw parameters. |
Definition at line 5802 of file map.cpp.
References drawsq_params::center(), draw_from_above(), draw_maptile(), g, catacurses::getmaxx(), catacurses::getmaxy(), drawsq_params::highlight(), inbounds(), is_draw_tiles_mode(), maptile_at(), catacurses::wmove(), tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by anonymous_namespace{animation.cpp}::draw_line_curses(), game::draw_look_around_cursor(), editmap::draw_main_ui_overlay(), target_ui::draw_terrain_overlay(), game::pickup(), and editmap::uber_draw_ter().
| void map::drop_everything | ( | const tripoint & | p | ) |
Handles map objects of given type (not creatures) falling down.
Returns true if anything changed.
Definition at line 2039 of file map.cpp.
References collapse_invalid_suspension(), drop_fields(), drop_furniture(), drop_items(), drop_vehicle(), has_flag(), and has_floor().
Referenced by process_falling().
| void map::drop_fields | ( | const tripoint & | p | ) |
Definition at line 2237 of file map.cpp.
References add_field(), field_entry::decays_on_actualize(), field_at(), field::field_count(), field_entry::get_field_age(), field_entry::get_field_intensity(), field_entry::get_field_type(), field::remove_field(), and tripoint_below.
Referenced by drop_everything().
| void map::drop_furniture | ( | const tripoint & | p | ) |
Definition at line 2055 of file map.cpp.
References _, Creature::add_msg_player_or_npc(), monster::apply_damage(), bash(), Character::deal_damage(), debugmsg, DT_BASH, f_null, furn(), furn_set(), g, map_data_common_t::has_flag(), has_floor(), has_items(), i_at(), i_clear(), m_bad, int_id< T >::obj(), rng(), support_dirty(), supports_above(), TFLAG_SEALED, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by drop_everything().
| void map::drop_items | ( | const tripoint & | p | ) |
Definition at line 2197 of file map.cpp.
References add_item_or_charges(), bash(), has_floor(), has_items(), i_at(), i_clear(), and tripoint::z.
Referenced by drop_everything().
| void map::drop_vehicle | ( | const tripoint & | p | ) |
Runs one cycle of emission src which may result in propagation of fields.
| pos | Location of emission |
| src | Id of object producing the emission |
| mul | Multiplies the chance and possibly qty (if chance*mul > 100) of the emission |
Definition at line 1924 of file map_field.cpp.
References emit::chance(), emit::field(), emit::intensity(), string_id< T >::is_valid(), propagate_field(), emit::qty(), roll_remainder(), and x_in_y().
Referenced by enchantment::activate_passive(), and emit_actor::use().
Calls the examine function of furniture or terrain at given tile, for given character.
Examines the tile pos, with character as the "examinator" Casts Character to player because player/NPC split isn't done yet.
Will only examine terrain if furniture had iexamine::none as the examine function.
Definition at line 1614 of file map.cpp.
References map_data_common_t::examine, furn(), iexamine::none(), int_id< T >::obj(), wrapped_vehicle::pos, and ter().
Referenced by npc::pick_up_item(), and water_from().
|
inline |
| std::string map::features | ( | const tripoint & | p | ) |
Definition at line 1708 of file map.cpp.
References _, om_direction::add(), has_flag(), and is_bashable().
Referenced by features(), and game::print_terrain_info().
Gets fields that are here.
Both for querying and edition.
Definition at line 5297 of file map.cpp.
References submap::get_field(), get_submap_at(), inbounds(), and nulfield.
Get the fields that are here.
This is for querying and looking at it only, one can not change the fields.
| p | The local map coordinates, if out of bounds, returns an empty field. |
Definition at line 5281 of file map.cpp.
References submap::get_field(), get_submap_at(), inbounds(), and nulfield.
Referenced by npc::could_move_onto(), dangerous_field_at(), decay_cosmetic_fields(), editmap::draw_main_ui_overlay(), drop_fields(), game::get_dangerous_tile(), get_field(), get_field_age(), get_field_intensity(), npc::good_escape_direction(), mop_spills(), game::print_fields_info(), process_fields_in_submap(), and smash().
|
protected |
Try to fill funnel based items here.
Simulates rain from since till now.
| p | The location in this map where to fill funnels. |
Definition at line 6990 of file map.cpp.
References getabs(), has_flag_ter_or_furn(), i_at(), retroactively_fill_from_funnel(), TFLAG_INDOORS, tr_at(), and calendar::turn.
Referenced by actualize().
| std::vector< tripoint > map::find_clear_path | ( | const tripoint & | source, |
| const tripoint & | destination | ||
| ) | const |
Iteratively tries Bresenham lines with different biases until it finds a clear line or decides there isn't one.
returns the line found, which may be the straight line, but blocked.
Definition at line 6231 of file map.cpp.
References a, line_to(), minor, rl_dist(), sees(), point::x, tripoint::xy(), and point::y.
Referenced by target_ui::set_cursor_pos().
| std::list< tripoint > map::find_furnitures_with_flag_in_radius | ( | const tripoint & | center, |
| size_t | radius, | ||
| const std::string & | flag, | ||
| size_t | radiusz = 0 |
||
| ) |
returns positions of furnitures with matching flag in the specified radius
Definition at line 8498 of file map.cpp.
References center, has_flag_furn(), and points_in_radius().
| bool map::flammable_items_at | ( | const tripoint & | p, |
| int | threshold = 0 |
||
| ) |
Checks if there are any flammable items on the tile.
| p | tile to check |
| threshold | Fuel threshold (lower means worse fuels are accepted). |
Definition at line 2618 of file map.cpp.
References has_flag(), has_items(), i_at(), TFLAG_ALLOW_FIELD_EFFECT, and TFLAG_SEALED.
Referenced by MapExtras::burned_ground_parser(), is_flammable(), firestarter_actor::moves_cost_by_fuel(), and process_fields_in_submap().
| units::volume map::free_volume | ( | const tripoint & | p | ) |
Definition at line 4207 of file map.cpp.
References item_stack::free_volume(), and i_at().
Referenced by add_item_or_charges().
|
private |
Runs a functor over given submaps over submaps in the area, getting next submap only when the current one "runs out" rather than every time.
gp in the functor is Grid (like get_submap_at_grid) coordinate of the submap, Will silently clip the area to map bounds.
| start | Starting point for function |
| end | End point for function |
| fun | Function to run |
Definition at line 8308 of file map.cpp.
References get_submap_at_grid(), ITER_CONTINUE, ITER_SKIP_SUBMAP, ITER_SKIP_ZLEVEL, my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, SEEX, SEEY, sx, sy, point::x, tripoint::x, point::y, tripoint::y, and tripoint::z.
Referenced by scent_blockers().
Definition at line 1342 of file map.cpp.
References f_null, submap::get_furn(), get_submap_at(), and inbounds().
Referenced by actualize(), ter_furn_transform::add_all_messages(), bash_furn_success(), bash_rating(), bash_resistance(), bash_strength(), bash_ter_furn(), board_up(), MapExtras::burned_ground_parser(), can_examine_at(), can_move_furniture(), vehicle::autodrive_controller::check_drivable(), deploy_tent_actor::check_intact(), close_door(), doors::close_door(), coverage(), create_anomaly(), MapExtras::dead_vegetation_parser(), destroy_furn(), game::do_turn(), draw_lab(), editmap::draw_main_ui_overlay(), drop_furniture(), examine(), game::examine(), game::extended_description(), farm_action(), talk_function::field_harvest(), find_potential_computer_point(), inventory::form_from_map(), furn(), furn_is_supported(), furnname(), get_changed_ids_from_update(), activity_handlers::repair_activity_hack::anonymous_namespace{activity_handlers.cpp}::get_fake_tool(), get_furn_transforms_into(), get_harvest(), get_harvest_names(), grab(), game::grabbed_furn_move(), grow_plant(), has_adjacent_furniture_with(), has_flag_furn(), has_furn(), is_bashable(), is_bashable_furn(), talk_function::loot_building(), map_stack::max_volume(), avatar_action::move(), move_cost(), obstacle_coverage(), om_harvest_furn(), open_door(), Character::place_corpse(), game::place_player(), mission_start::place_priest_diary(), game::print_terrain_info(), process_items_in_submap(), rad_scorch(), resolve_regional_terrain_and_furniture(), smash(), fungal_effects::spread_fungus_one_tile(), ter_furn_transform::transform(), use_charges(), iexamine::use_furn_fake_item(), game::walk_move(), and water_from().
Definition at line 839 of file map.h.
References abs_sub, furn_set(), and tripoint::z.
| void map::furn_set | ( | const tripoint & | p, |
| const furn_id & | new_furniture, | ||
| cata::poly_serialized< active_tile_data > | new_active = nullptr |
||
| ) |
Sets the furniture at given position.
| p | Position within the map |
| new_furniture | Id of new furniture |
| new_active | Override default active tile of new furniture |
Definition at line 1354 of file map.cpp.
References _, furn_t::active, submap::active_furniture, add_msg(), c, effect_crushed, f_null, f_rubble, field_furn_locs, g, get_distribution_grid_tracker(), submap::get_furn(), get_submap_at(), getabs(), map_data_common_t::has_flag(), inbounds(), invalidate_max_populated_zlev(), furn_t::is_movable(), map_data_common_t::name(), int_id< T >::obj(), OBJECT_FURNITURE, OBJECT_NONE, distribution_grid_tracker::on_changed(), set_floor_cache_dirty(), submap::set_furn(), set_memory_seen_cache_dirty(), set_outside_cache_dirty(), set_pathfinding_cache_dirty(), set_seen_cache_dirty(), set_transparency_cache_dirty(), support_dirty(), TFLAG_INDOORS, TFLAG_NO_FLOOR, TFLAG_SUN_ROOF_ABOVE, map_data_common_t::transparent, calendar::turn, tripoint::xy(), and tripoint::z.
Referenced by jmapgen_sign::apply(), jmapgen_vending_machine::apply(), jmapgen_toilet::apply(), jmapgen_gaspump::apply(), jmapgen_furniture::apply(), jmapgen_terrain::apply(), jmapgen_computer::apply(), jmapgen_sealed_item::apply(), jmapgen_setmap::apply(), bash_furn_success(), board_up(), MapExtras::burned_ground_parser(), close_door(), collapse_at(), collapse_invalid_suspension(), complete_construction(), create_anomaly(), MapExtras::dead_vegetation_parser(), draw_circle_furn(), draw_lab(), draw_line_furn(), draw_rough_circle_furn(), draw_square_furn(), drop_furniture(), farm_action(), talk_function::field_harvest(), mapgen_function_json_base::formatted_set_incredibly_simple(), mapf::formatted_set_simple(), furn_set(), game::grabbed_furn_move(), grow_plant(), talk_function::loot_building(), make_rubble(), mapgen_forest(), mapgen_forest_trail_curved(), mapgen_forest_trail_four_way(), mapgen_forest_trail_straight(), mapgen_forest_trail_tee(), mapgen_lake_shore(), mapgen_tutorial(), MapExtras::mx_burned_ground(), MapExtras::mx_clay_deposit(), MapExtras::mx_grave(), MapExtras::mx_house_spider(), MapExtras::mx_minefield(), MapExtras::mx_pond(), MapExtras::mx_roadworks(), MapExtras::mx_spider(), MapExtras::mx_supplydrop(), om_harvest_furn(), open_door(), place_toilet(), place_vending(), process_fields_in_submap(), rad_scorch(), mission_start::ranch_nurse_9(), mission_start::ranch_scavenger_3(), resolve_regional_terrain_and_furniture(), science_room(), set(), fungal_effects::spread_fungus_one_tile(), ter_or_furn_set(), ter_furn_transform::transform(), deploy_furn_actor::use(), and deploy_tent_actor::use().
|
inline |
| std::string map::furnname | ( | const tripoint & | p | ) |
Definition at line 1463 of file map.cpp.
References item_stack::begin(), debugmsg, item_stack::end(), furn(), map_data_common_t::has_flag(), i_at(), map_data_common_t::name(), int_id< T >::obj(), plant, iuse::seed(), string_format(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by furnname(), grab(), name(), game::place_player(), game::print_terrain_info(), smash(), and deploy_tent_actor::use().
|
private |
Definition at line 211 of file map_field.cpp.
References field::find_field(), maptile::get_field(), field_entry::get_field_intensity(), field_entry::get_field_type(), maptile::get_furn_t(), maptile::get_ter_t(), ter(), ter_furn_has_flag(), ter_furn_movecost(), and TFLAG_PERMEABLE.
Referenced by spread_gas().
|
private |
Definition at line 223 of file map_field.cpp.
References add_field(), debugmsg, maptile::find_field(), field_entry::get_field_age(), field_entry::get_field_intensity(), field_entry::get_field_type(), field_entry::set_field_age(), and field_entry::set_field_intensity().
Referenced by spread_gas().
| void map::generate | ( | const tripoint & | p, |
| const time_point & | when | ||
| ) |
Definition at line 105 of file mapgen.cpp.
References abs_sub, add_spawn(), MapExtras::apply_function(), map_extras::chance, dbg, debugmsg, draw_map(), g, oter_t::get_extras(), oter_t::get_mondensity(), get_nonant(), oter_t::get_static_spawns(), MonsterGroupManager::GetResultFromGroup(), getsubmap(), Info, MonsterGroupManager::is_animal(), MON_RADIUS, my_MAPSIZE, MonsterGroupResult::name, one_in(), overmap_buffer, MonsterGroupResult::pack_size, passable(), random_point(), region_settings_map, rng(), roll_remainder(), saven(), set_abs_sub(), setsubmap(), sm_to_omt_copy(), overmapbuffer::ter(), to_string(), map_extras::values, x_in_y(), and tripoint::z.
Referenced by farm_action(), defense_game::init_map(), loadn(), and editmap::mapgen_preview().
|
protected |
Definition at line 369 of file lightmap.cpp.
References add_light_from_items(), add_light_source(), apply_character_light(), apply_directional_light(), apply_light_arc(), apply_light_source(), item_stack::begin(), build_sunlight_cache(), clamp(), default_, tileray::dir(), effect_onfire, item_stack::end(), vehicle::face, level_cache::floor_cache, furniture, g, vehicle::get_all_parts(), get_cache(), vehicle::get_items(), get_player_character(), get_submap_at_grid(), get_vehicles(), vehicle::global_part_pos3(), has_items(), i_at(), inbounds(), field_entry::light_emitted(), light_transparency(), LIGHT_TRANSPARENCY_SOLID, lightmap_boundaries, LIGHTMAP_CACHE_X, LIGHTMAP_CACHE_Y, vehicle::lights(), LIT, field_entry::local_light_override(), M_SQRT2, my_MAPSIZE, NE, NW, calendar::once_every(), OVERMAP_DEPTH, points_in_rectangle(), SE, SEEX, SEEY, coords::sm, SW, sx, sy, terrain, update_light_quadrants(), VPFLAG_CARGO, VPFLAG_CIRCLE_LIGHT, VPFLAG_CONE_LIGHT, VPFLAG_EVENTURN, VPFLAG_HALF_CIRCLE_LIGHT, VPFLAG_ODDTURN, VPFLAG_WIDE_CONE_LIGHT, point::x, tripoint::x, tripoint::xy(), point::y, and tripoint::y.
Referenced by build_map_cache().
| tripoint map::get_abs_sub | ( | ) | const |
return abs_sub
Definition at line 8093 of file map.cpp.
References abs_sub.
Referenced by add_corpse(), jmapgen_field::apply(), jmapgen_sign::apply(), jmapgen_graffiti::apply(), jmapgen_liquid_item::apply(), jmapgen_loot::apply(), jmapgen_trap::apply(), jmapgen_terrain::apply(), jmapgen_ter_furn_transform::apply(), jmapgen_make_rubble::apply(), jmapgen_computer::apply(), jmapgen_setmap::apply(), VehicleSpawnFunction::builtin_parkinglot(), start_location::burn(), calc_max_populated_zlev(), draw_lab(), find_potential_computer_point(), game::get_cur_om(), game::get_levx(), game::get_levy(), game::get_levz(), distribution_grid_tracker::load(), madd_field(), mapgen_ants_generic(), mapgen_ants_larvae(), mapgen_ants_queen(), mapgen_cavern(), mapgen_crater(), mapgen_hive(), mapgen_road(), mremove_trap(), mtrap_set(), MapExtras::mx_house_spider(), MapExtras::mx_spider(), place_items(), start_location::place_player(), place_spawns(), points_in_range(), start_location::prepare_map(), rotate(), game::serialize(), shift(), and vertical_shift().
| std::list< item_location > map::get_active_items_in_radius | ( | const tripoint & | center, |
| int | radius | ||
| ) | const |
Definition at line 8452 of file map.cpp.
References center, get_active_items_in_radius(), and none.
Referenced by npc::find_corpse_to_pulp(), npc::find_dangerous_explosives(), and get_active_items_in_radius().
| std::list< item_location > map::get_active_items_in_radius | ( | const tripoint & | center, |
| int | radius, | ||
| special_item_type | type | ||
| ) | const |
Definition at line 8458 of file map.cpp.
References abs_sub, center, get_submap_at_grid(), my_MAPSIZE, none, rl_dist(), SEEX, SEEY, coords::sm, submaps_with_active_items, type, point::x, tripoint::xy(), and point::y.
|
inlineprivate |
Definition at line 1997 of file map.h.
References caches, and OVERMAP_DEPTH.
Referenced by add_field(), add_light_source(), add_vehicle(), add_vehicle_to_cache(), apply_directional_light(), apply_light_ray(), apply_light_source(), build_floor_cache(), build_map_cache(), build_outside_cache(), build_seen_cache(), build_sunlight_cache(), build_transparency_cache(), build_vision_transparency_cache(), check_and_set_seen_cache(), check_seen_cache(), check_vehicle_zones(), clear_vehicle_cache(), clear_vehicle_list(), clear_vehicle_point_from_cache(), editmap::cleartmpmap(), decay_fields_and_scent(), detach_vehicle(), displace_vehicle(), do_vehicle_caching(), generate_lightmap(), get_vehicle_zones(), invalidate_map_cache(), loadn(), process_fields(), process_fields_in_submap(), register_vehicle_zone(), remove_field(), reset_vehicle_cache(), set_floor_cache_dirty(), set_memory_seen_cache_dirty(), set_outside_cache_dirty(), set_seen_cache_dirty(), set_suspension_cache_dirty(), set_transparency_cache_dirty(), shift(), shift_vehicle_z(), ter_set(), update_suspension_cache(), update_vehicle_list(), update_visibility_cache(), veh_at(), veh_at_internal(), vehmove(), and vehproceed().
|
inline |
Definition at line 2010 of file map.h.
References caches, and OVERMAP_DEPTH.
Referenced by ambient_light_at(), apparent_light_at(), build_sunlight_cache(), decay_fields_and_scent(), draw(), generate_weather_anim_frame(), has_floor(), is_outside(), light_at(), light_transparency(), pl_line_of_sight(), pl_sees(), and update_visibility_cache().
| std::list< Creature * > map::get_creatures_in_radius | ( | const tripoint & | center, |
| size_t | radius, | ||
| size_t | radiusz = 0 |
||
| ) |
returns creatures in specified radius
Definition at line 8512 of file map.cpp.
References center, g, and points_in_radius().
Calculate next search points surrounding the current position.
Points closer to the target come first. This method leads to straighter lines and prevents weird looking movements away from the target.
Definition at line 6449 of file map.cpp.
References circle(), closest_points_first(), line(), and line_to().
Referenced by npc::move_to().
Definition at line 8284 of file map.cpp.
References field_at().
| field_entry * map::get_field | ( | const tripoint & | p, |
| const field_type_id & | type | ||
| ) |
Get field of specific type at point.
Definition at line 5367 of file map.cpp.
References field::find_field(), submap::get_field(), get_submap_at(), inbounds(), and type.
Referenced by add_item(), npc::assess_danger(), bash_field(), creature_in_field(), has_nearby_fire(), monster_in_field(), player_in_field(), firestarter_actor::prep_firestarter_use(), process_fields_in_submap(), set_field_age(), set_field_intensity(), and shoot().
| time_duration map::get_field_age | ( | const tripoint & | p, |
| const field_type_id & | type | ||
| ) | const |
Get the age of a field entry (field_entry::age), if there is no field of that type, returns -1_turns.
Definition at line 5355 of file map.cpp.
References field_at(), field::find_field(), field_entry::get_field_age(), and type.
Referenced by game::grabbed_furn_move(), and game::walk_move().
| int map::get_field_intensity | ( | const tripoint & | p, |
| const field_type_id & | type | ||
| ) | const |
Get the intensity of a field entry (field_entry::intensity), if there is no field of that type, returns 0.
Definition at line 5361 of file map.cpp.
References field_at(), field::find_field(), and type.
Referenced by game::grabbed_furn_move(), is_flammable(), propagate_field(), fungal_effects::spread_fungus_one_tile(), and game::walk_move().
| const std::vector< tripoint > & map::get_furn_field_locations | ( | ) | const |
Definition at line 1606 of file map.cpp.
References furn(), string_id< T >::id(), int_id< T >::obj(), and furn_t::transforms_into.
| const harvest_id & map::get_harvest | ( | const tripoint & | p | ) | const |
Returns the full harvest list, for spawning.
Definition at line 1558 of file map.cpp.
References furn(), iexamine::none(), string_id< harvest_list >::NULL_ID(), wrapped_vehicle::pos, ter(), and TFLAG_HARVESTED.
Referenced by is_harvestable().
| const std::set< std::string > & map::get_harvest_names | ( | const tripoint & | p | ) | const |
Returns names of the items that would be dropped.
Definition at line 1578 of file map.cpp.
References furn(), iexamine::none(), wrapped_vehicle::pos, ter(), and TFLAG_HARVESTED.
Referenced by npc::find_item().
| uint8_t map::get_known_connections | ( | const tripoint & | p, |
| int | connect_group, | ||
| const std::map< tripoint, ter_id > & | override = {} |
||
| ) | const |
Definition at line 1504 of file map.cpp.
References access_cache(), map_data_common_t::connects_to(), g, get_visibility(), get_visibility_variables_cache(), getabs(), inbounds(), is_transparent(), LIGHT_TRANSPARENCY_SOLID, int_id< T >::obj(), offsets, ter(), use_tiles, VIS_CLEAR, tripoint::x, tripoint::y, and tripoint::z.
Referenced by determine_wall_corner().
Definition at line 190 of file map_field.cpp.
References eight_horizontal_neighbors, maptile_has_bounds(), my_MAPSIZE, SEEX, SEEY, tripoint::x, and tripoint::y.
Referenced by process_fields_in_submap(), and spread_gas().
|
inlineprotected |
Definition at line 1851 of file map.h.
References abs_sub, get_nonant(), and tripoint::z.
|
protected |
Get the index of a submap pointer in the grid given by grid coordinates.
The grid coordinates must be valid: 0 <= x < my_MAPSIZE, same for y. Version with z-levels checks for z between -OVERMAP_DEPTH and OVERMAP_HEIGHT
Definition at line 8140 of file map.cpp.
References my_MAPSIZE, OVERMAP_HEIGHT, OVERMAP_LAYERS, tripoint::x, tripoint::y, tripoint::z, and zlevels.
Referenced by copy_grid(), fake_map::fake_map(), generate(), get_nonant(), get_submap_at_grid(), loadn(), and saven().
|
private |
Definition at line 8574 of file map.cpp.
References OVERMAP_DEPTH, and pathfinding_caches.
Referenced by get_pathfinding_cache_ref(), set_pathfinding_cache_dirty(), and update_pathfinding_cache().
| const pathfinding_cache & map::get_pathfinding_cache_ref | ( | int | zlev | ) | const |
Definition at line 8586 of file map.cpp.
References debugmsg, get_pathfinding_cache(), inbounds_z(), OVERMAP_DEPTH, pathfinding_caches, and update_pathfinding_cache().
Referenced by route(), and vertical_move_destination().
| int map::get_radiation | ( | const tripoint & | p | ) | const |
Definition at line 4011 of file map.cpp.
References submap::get_radiation(), get_submap_at(), and inbounds().
Referenced by editmap::draw_main_ui_overlay(), and rad_scorch().
Definition at line 3087 of file map.cpp.
References debugmsg, int_id< T >::id(), int_id< T >::obj(), OVERMAP_DEPTH, ter_t::roof, t_dirt, t_null, t_open_air, t_rock_floor, t_rock_floor_no_roof, ter(), tripoint::x, tripoint::y, tripoint::z, and zlevels.
Referenced by bash_ter_furn(), and bash_ter_success().
| std::string map::get_signage | ( | const tripoint & | p | ) | const |
Definition at line 3977 of file map.cpp.
References submap::get_signage(), get_submap_at(), and inbounds().
Referenced by game::extended_description(), game::place_player(), and game::print_terrain_info().
Definition at line 1823 of file map.h.
References abs_sub, get_submap_at(), and tripoint::z.
Definition at line 1832 of file map.h.
References abs_sub, get_submap_at(), and tripoint::z.
Get the submap pointer containing the specified position within the reality bubble.
(p) must be a valid coordinate, check with inbounds.
Definition at line 8119 of file map.cpp.
References debugmsg, get_submap_at_grid(), inbounds(), SEEX, SEEY, tripoint::x, tripoint::y, and tripoint::z.
Referenced by add_computer(), add_field(), add_item(), add_spawn(), adjust_radiation(), computer_at(), delete_graffiti(), delete_signage(), displace_vehicle(), field_at(), furn(), furn_set(), get_field(), get_radiation(), get_signage(), get_submap_at(), get_temperature(), graffiti_at(), has_flag_ter_or_furn(), has_graffiti_at(), has_items(), hoist_submap_camp(), i_at(), i_clear(), i_rem(), make_active(), maptile_at_internal(), move_cost_ter_furn(), partial_con_at(), partial_con_remove(), partial_con_set(), remove_field(), remove_submap_camp(), remove_trap(), set_graffiti(), set_radiation(), set_signage(), set_temperature(), shift_vehicle_z(), ter(), ter_set(), tr_at(), trap_set(), update_lum(), update_submap_active_item_status(), and update_suspension_cache().
Get the submap pointer containing the specified position within the reality bubble.
The same as other get_submap_at, (p) must be valid (inbounds). Also writes the position within the submap to offset_p
Definition at line 8128 of file map.cpp.
References get_submap_at(), SEEX, SEEY, point::x, tripoint::x, point::y, and tripoint::y.
Get submap pointer in the grid at given grid coordinates.
Grid coordinates must be valid: 0 <= x < my_MAPSIZE, same for y. z must be between -OVERMAP_DEPTH and OVERMAP_HEIGHT
Definition at line 1840 of file map.h.
References get_nonant(), and getsubmap().
Referenced by actualize(), add_roofs(), add_vehicle(), build_floor_cache(), build_obstacle_cache(), build_outside_cache(), build_transparency_cache(), calc_max_populated_zlev(), check_submap_active_item_consistency(), copy_grid(), decay_fields_and_scent(), detach_vehicle(), draw_fill_background(), editmap::draw_main_ui_overlay(), function_over(), generate_lightmap(), get_active_items_in_radius(), get_submap_at(), get_vehicles(), editmap::mapgen_preview(), editmap::mapgen_veh_destroy(), editmap::mapgen_veh_query(), process_fields(), process_fields_in_submap(), process_items(), rotate(), shift(), spawn_monsters_submap(), spawn_monsters_submap_group(), update_pathfinding_cache(), and update_suspension_cache().
Definition at line 8135 of file map.cpp.
References get_nonant(), and getsubmap().
|
inline |
Definition at line 2024 of file map.h.
References submaps_with_active_items.
| int map::get_temperature | ( | const tripoint & | p | ) | const |
Definition at line 4048 of file map.cpp.
References get_submap_at(), submap::get_temperature(), and inbounds().
Definition at line 1601 of file map.cpp.
References string_id< T >::id(), int_id< T >::obj(), ter(), and ter_t::transforms_into.
| std::vector< zone_data * > map::get_vehicle_zones | ( | int | zlev | ) |
Definition at line 933 of file map.cpp.
References zone_manager::cache_vzones(), get_cache(), and zone_manager::get_manager().
| VehicleList map::get_vehicles | ( | ) |
Definition at line 232 of file map.cpp.
References abs_sub, get_vehicles(), last_full_vehicle_list, last_full_vehicle_list_dirty, my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, SEEX, SEEY, tripoint::z, and zlevels.
Referenced by game::autopilot_vehicles(), build_obstacle_cache(), MapExtras::burned_ground_parser(), generate_lightmap(), get_vehicles(), MapExtras::mx_burned_ground(), scent_blockers(), game::start_game(), game::validate_linked_vehicles(), and vehproceed().
| VehicleList map::get_vehicles | ( | const tripoint & | start, |
| const tripoint & | end | ||
| ) |
Definition at line 974 of file map.cpp.
References get_submap_at_grid(), vehicle::global_pos3(), my_MAPSIZE, wrapped_vehicle::pos, SEEX, SEEY, wrapped_vehicle::v, submap::vehicles, tripoint::x, tripoint::y, and tripoint::z.
| visibility_type map::get_visibility | ( | lit_level | ll, |
| const visibility_variables & | cache | ||
| ) | const |
Definition at line 5624 of file map.cpp.
References BLANK, BRIGHT, BRIGHT_ONLY, DARK, LIT, LOW, MEMORIZED, visibility_variables::u_is_boomered, VIS_BOOMER, VIS_BOOMER_DARK, VIS_CLEAR, VIS_DARK, VIS_HIDDEN, and VIS_LIT.
Referenced by draw(), game::draw_look_around_cursor(), generate_weather_anim_frame(), get_known_connections(), and game::print_all_tile_info().
| const visibility_variables & map::get_visibility_variables_cache | ( | ) | const |
Definition at line 5619 of file map.cpp.
References visibility_variables_cache.
Referenced by draw(), generate_weather_anim_frame(), get_known_connections(), and editmap::update_view_with_help().
| std::tuple< maptile, maptile, maptile > map::get_wind_blockers | ( | const int & | winddirection, |
| const tripoint & | pos | ||
| ) |
Definition at line 1890 of file map_field.cpp.
References maptile_at(), point_east, point_north, point_north_east, point_north_west, point_south, point_south_east, point_south_west, and point_west.
Referenced by spread_gas().
Translates local (to this map) coordinates of a square to global absolute coordinates.
Coordinates is in the system that is used by the ter/furn/i_at functions. Output is in the same scale, but in global system.
Definition at line 8078 of file map.cpp.
References abs_sub, sm_to_ms_copy(), and tripoint::xy().
Referenced by add_item(), jmapgen_zone::apply(), bash_ter_furn(), iexamine::bulletin_board(), vehicle::autodrive_controller::check_drivable(), game::check_near_zone(), game::check_zone(), complete_construction(), game::control_vehicle(), activity_handlers::repair_activity_hack::anonymous_namespace{activity_handlers.cpp}::discharge_real_power_source(), npc::do_pulp(), draw_maptile(), iexamine::elevator(), fill_funnels(), game::find_or_make_stairs(), find_valid_teleporters_omt(), inventory::form_from_map(), furn_set(), activity_handlers::repair_activity_hack::anonymous_namespace{activity_handlers.cpp}::get_fake_tool(), get_known_connections(), getabs(), npc::go_to_omt_destination(), good_fishing_spot(), game::grabbed_furn_move(), grow_plant(), npc::guard_current_pos(), mine_activity(), npc::move(), game::place_vehicle_nearby(), game::pre_print_all_tile_info(), sounds::process_sounds(), npc::reach_omt_destination(), zone_manager::rotate_zones(), target_ui::set_last_target(), shoot(), smash(), spawn_monsters_submap_group(), debug_menu::spawn_nested_mapgen(), spread_gas(), ter_set(), vehicle::total_wind_epower_w(), translate_radius(), update_suspension_cache(), use_charges_from_furn(), iexamine::use_furn_fake_item(), vertical_move_destination(), iuse::weather_tool(), npc::worker_downtime(), and game::zones_manager().
Definition at line 1635 of file map.h.
References abs_sub, getlocal(), tripoint::xy(), and tripoint::z.
Inverse of getabs.
Definition at line 8083 of file map.cpp.
References abs_sub, sm_to_ms_copy(), and tripoint::xy().
Referenced by grid_furn_transform_queue::apply(), complete_construction(), veh_interact::complete_vehicle(), vehicle::autodrive_controller::compute_obstacles(), basecamp_action_components::consume_components(), deregister_vehicle_zone(), construct::done_digormine_stair(), construct::done_mine_upstair(), npc::execute_action(), game::find_or_make_stairs(), basecamp::form_crafting_inventory(), inventory::form_from_zone(), getlocal(), npc::go_to_omt_destination(), npc::good_escape_direction(), npc::move(), npc::move_to(), map_cursor::operator tripoint(), activity_handlers::pickaxe_do_turn(), activity_handlers::pickaxe_finish(), teleporter_list::place_avatar_overmap(), basecamp::place_results(), npc::reach_omt_destination(), target_ui::recalc_aim_turning_penalty(), npc::regen_ai_cache(), rotate(), zone_manager::rotate_zones(), debug_menu::spawn_nested_mapgen(), activity_handlers::travel_do_turn(), target_ui::try_reacquire_target(), update_suspension_cache(), vertical_move_destination(), npc::worker_downtime(), and game::zones_manager().
|
inline |
Definition at line 1652 of file map.h.
References my_MAPSIZE.
Referenced by distribution_grid_tracker::load(), and points_in_range().
|
private |
Get the submap pointer with given index in grid, the index must be valid!
Definition at line 8098 of file map.cpp.
References debugmsg, and grid.
Referenced by generate(), get_submap_at_grid(), and saven().
| const std::string & map::graffiti_at | ( | const tripoint & | p | ) | const |
Definition at line 7684 of file map.cpp.
References submap::get_graffiti(), get_submap_at(), and inbounds().
Referenced by game::place_player(), and game::print_graffiti_info().
|
protected |
Try to grow a harvestable plant to the next stage(s).
Definition at line 7013 of file map.cpp.
References item_stack::begin(), dbg, item_stack::end(), map_stack::erase(), Error, f_null, furn(), furn_set(), getabs(), has_flag_furn(), i_at(), i_clear(), int_id< T >::id(), int_id< T >::obj(), overmap_buffer, rotten_item_spawn(), iuse::seed(), string_id< T >::str(), and overmapbuffer::ter().
Referenced by actualize().
| bool map::has_adjacent_furniture_with | ( | const tripoint & | p, |
| const std::function< bool(const furn_t &)> & | filter | ||
| ) |
Returns true if there is furniture for which filter returns true in a 1 tile radius of p.
Pass return_true<furn_t> to detect all adjacent furniture.
| p | the location to check at |
| filter | what to filter the furniture by. |
Definition at line 2734 of file map.cpp.
References furn(), has_furn(), and points_in_radius().
|
inline |
Definition at line 938 of file map.h.
References abs_sub, has_flag(), and tripoint::z.
| bool map::has_flag | ( | const std::string & | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2287 of file map.cpp.
References has_flag_ter_or_furn().
Referenced by accessible_items(), add_item(), add_item_or_charges(), npc::assess_danger(), bash(), bash_ter_furn(), bash_ter_success(), start_location::burn(), game::butcher(), can_examine_at(), can_put_items_ter_furn(), monster::can_reach_to(), vehicle::check_falling_or_floating(), climb_difficulty(), close_door(), doors::close_door(), collapse_at(), collapse_check(), displace_water(), dont_draw_lower_floor(), draw_lab(), drop_everything(), iexamine::elevator(), game::examine(), features(), find_closest_stair(), game::find_or_make_stairs(), flammable_items_at(), game::fling_creature(), game::forced_door_closing(), game::get_dangerous_tile(), game::get_fishable_locations(), overmap_ui::get_overmap_path_to(), game::grabbed_furn_move(), has_flag(), has_nearby_chair(), has_nearby_table(), haul(), hit_with_fire(), is_divable(), game::is_empty(), is_flammable(), is_water_shallow_current(), game::knockback(), mine_activity(), mop_spills(), monster::move(), avatar_action::move(), npc::move_to(), move_vehicle(), game::moving_vehicle_dismount(), MapExtras::mx_minefield(), item::on_drop(), open(), open_door(), vehicle::part_collision(), activity_handlers::pickaxe_finish(), game::place_player(), game::print_fields_info(), game::print_items_info(), process_fields_in_submap(), propagate_field(), propagate_suspension_check(), avatar_action::ramp_move(), rate_location(), route(), vehicle::shift_zlevel(), shoot(), spawn_an_item(), spawn_items(), fungal_effects::spread_fungus(), fungal_effects::spread_fungus_one_tile(), monster::stumble(), avatar_action::swim(), game::update_stair_monsters(), place_trap_actor::use(), deploy_tent_actor::use(), use_charges_from_furn(), game::use_computer(), game::vertical_move(), vertical_move_destination(), game::walk_move(), water_from(), and npc::worker_downtime().
|
inline |
Definition at line 969 of file map.h.
References abs_sub, has_flag(), and tripoint::z.
| bool map::has_flag | ( | ter_bitflags | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2330 of file map.cpp.
References has_flag_ter_or_furn().
|
inline |
Definition at line 958 of file map.h.
References abs_sub, has_flag_furn(), and tripoint::z.
| bool map::has_flag_furn | ( | const std::string & | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2311 of file map.cpp.
References furn(), map_data_common_t::has_flag(), and int_id< T >::obj().
Referenced by bash_furn_success(), draw_lab(), ranged::execute_shaped_attack(), ranged::expected_coverage(), find_furnitures_with_flag_in_radius(), find_valid_teleporters_omt(), grow_plant(), has_flag_furn(), and npc::worker_downtime().
|
inline |
Definition at line 979 of file map.h.
References abs_sub, has_flag_furn(), and tripoint::z.
| bool map::has_flag_furn | ( | ter_bitflags | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2340 of file map.cpp.
References furn(), map_data_common_t::has_flag(), and int_id< T >::obj().
|
inline |
Definition at line 953 of file map.h.
References abs_sub, has_flag_ter(), and tripoint::z.
| bool map::has_flag_ter | ( | const std::string & | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2306 of file map.cpp.
References map_data_common_t::has_flag(), int_id< T >::obj(), and ter().
Referenced by add_vehicle_to_map(), jmapgen_terrain::apply(), bash_ter_success(), start_location::burn(), draw_lab(), find_potential_computer_point(), has_flag_ter(), is_last_ter_wall(), fungal_effects::marlossify(), MapExtras::mx_clearcut(), MapExtras::mx_grove(), MapExtras::mx_portal(), MapExtras::mx_shrubbery(), MapExtras::mx_spider(), obstacle_coverage(), game::place_player(), fungal_effects::spread_fungus(), fungal_effects::spread_fungus_one_tile(), and game::walk_move().
|
inline |
Definition at line 974 of file map.h.
References abs_sub, has_flag_ter(), and tripoint::z.
| bool map::has_flag_ter | ( | ter_bitflags | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2335 of file map.cpp.
References map_data_common_t::has_flag(), int_id< T >::obj(), and ter().
|
inline |
Definition at line 963 of file map.h.
References abs_sub, has_flag_ter_or_furn(), and tripoint::z.
| bool map::has_flag_ter_or_furn | ( | const std::string & | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2316 of file map.cpp.
References submap::get_furn(), get_submap_at(), submap::get_ter(), map_data_common_t::has_flag(), inbounds(), and int_id< T >::obj().
Referenced by can_use_bipod(), vehicle::check_falling_or_floating(), vehicle::check_heli_ascend(), vehicle::check_heli_descend(), could_see_items(), fill_funnels(), inventory::form_from_map(), ranged::gunmode_checks_weapon(), has_flag(), has_flag_ter_or_furn(), has_nearby_fire(), npc::move_to(), vehicle::part_collision(), game::place_player(), vehicle_movement::scan_rails_from_veh_internal(), spawn_monsters_submap_group(), and game::walk_move().
|
inline |
Definition at line 984 of file map.h.
References abs_sub, has_flag_ter_or_furn(), and tripoint::z.
| bool map::has_flag_ter_or_furn | ( | ter_bitflags | flag, |
| const tripoint & | p | ||
| ) | const |
Definition at line 2345 of file map.cpp.
References submap::get_furn(), get_submap_at(), submap::get_ter(), map_data_common_t::has_flag(), inbounds(), and int_id< T >::obj().
| bool map::has_floor | ( | const tripoint & | p | ) | const |
Definition at line 2001 of file map.cpp.
References level_cache::floor_cache, get_cache_ref(), inbounds(), OVERMAP_DEPTH, OVERMAP_HEIGHT, tripoint::x, tripoint::y, tripoint::z, and zlevels.
Referenced by npc::can_move_to(), drop_everything(), drop_furniture(), drop_items(), game::grabbed_furn_move(), game::print_terrain_info(), projectile_attack(), ranged_target_size(), spawn_monsters_submap_group(), editmap::update_view_with_help(), and npc::worker_downtime().
| bool map::has_floor_or_support | ( | const tripoint & | p | ) | const |
Definition at line 2033 of file map.cpp.
References valid_move(), tripoint::xy(), and tripoint::z.
Referenced by monster::move(), game::print_terrain_info(), avatar_action::ramp_move(), reachable_flood_steps(), smash(), and game::vertical_move().
|
inline |
Definition at line 823 of file map.h.
References abs_sub, has_furn(), and tripoint::z.
| bool map::has_furn | ( | const tripoint & | p | ) | const |
Definition at line 1337 of file map.cpp.
References f_null, and furn().
Referenced by add_boardable(), bash_resistance(), bash_strength(), board_up(), can_examine_at(), game::examine(), game::extended_description(), inventory::form_from_map(), furn_is_supported(), get_changed_ids_from_update(), activity_handlers::repair_activity_hack::anonymous_namespace{activity_handlers.cpp}::get_fake_tool(), grab(), game::grabbed_furn_move(), has_adjacent_furniture_with(), has_furn(), is_bashable(), is_bashable_furn(), is_last_ter_wall(), talk_function::loot_building(), fungal_effects::marlossify(), map_stack::max_volume(), name(), game::print_terrain_info(), rcdrive(), smash(), deploy_furn_actor::use(), deploy_tent_actor::use(), use_charges(), iexamine::use_furn_fake_item(), and game::walk_move().
| bool map::has_graffiti_at | ( | const tripoint & | p | ) | const |
Definition at line 7695 of file map.cpp.
References get_submap_at(), submap::has_graffiti(), and inbounds().
Referenced by editmap::draw_main_ui_overlay(), game::place_player(), and game::print_graffiti_info().
| bool map::has_items | ( | const tripoint & | p | ) | const |
Checks for existence of items.
Faster than i_at(p).empty
Definition at line 4773 of file map.cpp.
References submap::get_items(), get_submap_at(), and inbounds().
Referenced by bash_items(), can_examine_at(), drop_furniture(), drop_items(), flammable_items_at(), inventory::form_from_map(), generate_lightmap(), haul(), iuse::note_bionics(), npc::pick_up_item(), game::place_player(), sees_some_items(), and smash_items().
| bool map::has_nearby_chair | ( | const tripoint & | p, |
| int | radius = 1 |
||
| ) |
Check whether a chair or vehicle seat is nearby.
Definition at line 2773 of file map.cpp.
References has_flag(), points_in_radius(), and veh_at().
| bool map::has_nearby_fire | ( | const tripoint & | p, |
| int | radius = 1 |
||
| ) |
Definition at line 2746 of file map.cpp.
References fd_fire, get_field(), has_flag_ter_or_furn(), and points_in_radius().
Referenced by inventory::form_from_map().
| bool map::has_nearby_table | ( | const tripoint & | p, |
| int | radius = 1 |
||
| ) |
Check whether a table/workbench/vehicle kitchen or other flat surface is nearby that could be used for crafting or eating.
Definition at line 2759 of file map.cpp.
References has_flag(), points_in_radius(), and veh_at().
|
inline |
Definition at line 1655 of file map.h.
References zlevels.
Referenced by vehicle::check_falling_or_floating(), vehicle::check_heli_descend(), draw_critter_internal(), game::get_dangerous_tile(), overmapbuffer::get_npcs_near_player(), game::load_npcs(), game::look_around(), game::perhaps_add_random_npc(), game::place_player(), game::place_player_overmap(), points_in_range(), game::print_terrain_info(), route(), target_ui::run(), game::shift_monsters(), smash(), monster::stumble(), game::update_map(), game::update_stair_monsters(), game::vertical_move(), vertical_move_destination(), and game::vertical_shift().
| bool map::hit_with_acid | ( | const tripoint & | p | ) |
Definition at line 3807 of file map.cpp.
References _, add_msg(), m_warning, one_in(), passable(), t_bars, t_card_industrial, t_card_military, t_card_reader_broken, t_card_science, t_door_b, t_door_bar_c, t_door_bar_locked, t_door_bar_o, t_door_c, t_door_frame, t_door_locked, t_door_locked_alarm, t_door_locked_peep, t_floor, t_floor_wax, t_gas_pump, t_gas_pump_smashed, t_reb_cage, t_vat, t_wall_glass, t_wall_glass_alarm, t_wax, t_window, t_window_alarm, t_window_empty, t_window_no_curtains, ter(), and ter_set().
| bool map::hit_with_fire | ( | const tripoint & | p | ) |
Definition at line 3844 of file map.cpp.
References add_field(), fd_fire, has_flag(), and passable().
Definition at line 5555 of file map.cpp.
References submap::camp, and get_submap_at().
Referenced by game::validate_camps().
Definition at line 4067 of file map.cpp.
References submap::get_items(), get_submap_at(), inbounds(), and nulitems.
Referenced by add_item_or_charges(), advanced_inventory_pane::add_items_from_area(), apply_faction_ownership(), bash_furn_success(), bash_items(), board_up(), MapExtras::burned_ground_parser(), game::butcher(), doors::close_door(), complete_construction(), iuse::directional_antenna(), drop_furniture(), drop_items(), iexamine::elevator(), explosion_handler::emp_blast(), game::examine(), farm_action(), talk_function::field_harvest(), fill_funnels(), npc::find_corpse_to_pulp(), npc::find_item(), game::find_nearby_items(), flammable_items_at(), game::forced_door_closing(), basecamp::form_crafting_inventory(), inventory::form_from_map(), free_volume(), furnname(), generate_lightmap(), advanced_inv_area::get_container(), game::grabbed_furn_move(), grow_plant(), i_at(), i_rem(), advanced_inventory_pane::load_settings(), talk_function::loot_building(), max_volume(), mop_spills(), MapExtras::mx_supplydrop(), iuse::note_bionics(), om_harvest_itm(), iexamine::pedestal_wyrm(), npc::pick_up_item_map(), activity_handlers::pickaxe_finish(), game::place_player(), firestarter_actor::prep_firestarter_use(), game::print_items_info(), process_fields_in_submap(), process_items_in_submap(), produce_sap(), npc::see_item_say_smth(), smash(), smash_items(), fungal_effects::spread_fungus_one_tile(), game::start_hauling(), basecamp::start_relay_hide_site(), stored_volume(), tinder_at(), use_amount_square(), use_charges(), use_charges_from_furn(), and iexamine::use_furn_fake_item().
|
inline |
| void map::i_clear | ( | const tripoint & | p | ) |
Definition at line 4105 of file map.cpp.
References abs_sub, submap::active_items, active_item_cache::empty(), submap::get_items(), get_submap_at(), active_item_cache::remove(), SEEX, SEEY, submap::set_lum(), submaps_with_active_items, tripoint::x, tripoint::y, and tripoint::z.
Referenced by jmapgen_terrain::apply(), board_up(), doors::close_door(), MapExtras::dead_vegetation_parser(), draw_lab(), drop_furniture(), drop_items(), farm_action(), talk_function::field_harvest(), game::grabbed_furn_move(), grow_plant(), i_clear(), mapgen_lake_shore(), om_harvest_itm(), iexamine::pedestal_wyrm(), and rad_scorch().
|
inline |
Definition at line 1221 of file map.h.
References abs_sub, i_rem(), and tripoint::z.
Definition at line 4096 of file map.cpp.
References item_stack::end(), item_stack::get_iterator_from_pointer(), i_at(), and i_rem().
| map_stack::iterator map::i_rem | ( | const tripoint & | p, |
| map_stack::const_iterator | it | ||
| ) |
Definition at line 4080 of file map.cpp.
References abs_sub, submap::active_items, active_item_cache::empty(), submap::get_items(), get_submap_at(), active_item_cache::remove(), SEEX, SEEY, submaps_with_active_items, submap::update_lum_rem(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by iexamine::elevator(), i_rem(), om_set_hide_site(), rcdrive(), remove_rotten_items(), game::save_cyborg(), and smash_items().
|
inline |
| bool map::impassable | ( | const tripoint & | p | ) | const |
Definition at line 1789 of file map.cpp.
References passable().
Referenced by add_splatter_trail(), add_vehicle_to_map(), bash_ter_furn(), destroy(), explosion_handler::do_blast_new(), construct::done_digormine_stair(), game::find_or_make_stairs(), game::fling_creature(), game::grabbed_furn_move(), is_cornerfloor(), is_wall_adjacent(), game::knockback(), make_rubble(), mapgen_cavern(), game::monmove(), MapExtras::mx_drugdeal(), game::peek(), game::phasing_move(), place_spawns(), points_for_gas_cloud(), game::print_terrain_info(), process_fields_in_submap(), propagate_field(), ranged_target_size(), rate_location(), rcdrive(), shoot(), spawn_spores(), deploy_tent_actor::use(), and game::walk_move().
| bool map::impassable_ter_furn | ( | const tripoint & | p | ) | const |
Definition at line 1822 of file map.cpp.
References passable_ter_furn().
Referenced by vehicle::check_heli_ascend(), vehicle::check_heli_descend(), climb_difficulty(), displace_water(), and vehicle::part_collision().
|
inline |
Definition at line 1639 of file map.h.
References inbounds().
|
virtual |
Reimplemented in tinymap.
Definition at line 7618 of file map.cpp.
References half_open_cuboid< Tripoint, >::contains(), MAPSIZE_X, MAPSIZE_Y, OVERMAP_DEPTH, and OVERMAP_HEIGHT.
Referenced by vehicle::act_on_map(), add_field(), add_item(), MapgenRemovePartHandler::add_item_or_charges(), add_item_or_charges(), add_vehicle(), add_vehicle_to_cache(), adjust_radiation(), ambient_light_at(), apply_light_source(), bash(), bash_rating(), build_sunlight_cache(), clear_path(), clear_vehicle_cache(), clear_vehicle_point_from_cache(), computer_at(), delete_graffiti(), delete_signage(), displace_vehicle(), do_vehicle_caching(), draw(), game::draw_look_around_cursor(), drawsq(), ranged::execute_shaped_attack(), field_at(), furn(), furn_set(), generate_lightmap(), get_field(), get_known_connections(), get_radiation(), get_signage(), get_submap_at(), get_temperature(), graffiti_at(), has_flag_ter_or_furn(), has_floor(), has_graffiti_at(), has_items(), i_at(), inbounds(), is_bashable(), is_outside(), light_at(), game::load_npcs(), maptile_at(), map_stack::max_volume(), move_cost(), move_cost_ter_furn(), partial_con_at(), partial_con_remove(), partial_con_set(), pl_line_of_sight(), pl_sees(), game::print_all_tile_info(), remove_field(), remove_trap(), route(), npc::saw_player_recently(), sees(), set_graffiti(), set_radiation(), set_seen_cache_dirty(), set_signage(), set_temperature(), set_transparency_cache_dirty(), game::shift_monsters(), shift_traps(), shoot(), spawn_items(), ter(), ter_set(), tr_at(), trap_set(), update_suspension_cache(), valid_move(), and veh_at().
|
inline |
Definition at line 1643 of file map.h.
References OVERMAP_DEPTH, and OVERMAP_HEIGHT.
Referenced by vehicle::check_heli_ascend(), get_pathfinding_cache_ref(), invalidate_map_cache(), set_floor_cache_dirty(), set_outside_cache_dirty(), set_pathfinding_cache_dirty(), set_seen_cache_dirty(), set_suspension_cache_dirty(), set_transparency_cache_dirty(), and game::vertical_notes().
|
inline |
Definition at line 458 of file map.h.
References level_cache::floor_cache_dirty, get_cache(), inbounds_z(), level_cache::outside_cache_dirty, level_cache::seen_cache_dirty, level_cache::suspension_cache_dirty, and level_cache::transparency_cache_dirty.
Referenced by debug_menu::debug(), game::look_around(), game::peek(), start_location::place_player(), aim_activity_actor::restore_view(), target_ui::run(), target_ui::set_view_offset(), game::start_game(), game::update_map(), vehicle::use_bike_rack(), and game::vertical_move().
|
private |
Conditionally invalidates max_pupulated_zlev cache if the submap uniformity change occurs above current max_pupulated_zlev value.
| zlev | zlevel where uniformity change occured |
Definition at line 8772 of file map.cpp.
References max_populated_zlev.
Referenced by add_field(), add_item(), add_vehicle(), displace_vehicle(), furn_set(), shift_vehicle_z(), and ter_set().
|
inline |
Definition at line 991 of file map.h.
References abs_sub, is_bashable(), and tripoint::z.
| bool map::is_bashable | ( | const tripoint & | p, |
| bool | allow_floor = false |
||
| ) | const |
Returns true if there is a bashable vehicle part or the furn/terrain is bashable at p.
Definition at line 2407 of file map.cpp.
References bash(), map_data_common_t::bash, dbg, furn(), has_furn(), inbounds(), int_id< T >::obj(), map_bash_info::str_max, ter(), veh_at(), and Warn.
Referenced by MapExtras::burned_ground_parser(), features(), game::fling_creature(), is_bashable(), npc::move_to(), MapExtras::mx_helicopter(), and activity_handlers::pickaxe_finish().
|
inline |
Definition at line 1001 of file map.h.
References abs_sub, is_bashable_furn(), and tripoint::z.
| bool map::is_bashable_furn | ( | const tripoint & | p | ) | const |
Returns true if the furniture at p is bashable.
Definition at line 2432 of file map.cpp.
References map_data_common_t::bash, furn(), has_furn(), int_id< T >::obj(), and map_bash_info::str_max.
Referenced by is_bashable_furn(), is_bashable_ter_furn(), and make_rubble().
|
inline |
Definition at line 996 of file map.h.
References abs_sub, is_bashable_ter(), and tripoint::z.
| bool map::is_bashable_ter | ( | const tripoint & | p, |
| bool | allow_floor = false |
||
| ) | const |
Returns true if the terrain at p is bashable.
Definition at line 2426 of file map.cpp.
References map_data_common_t::bash, int_id< T >::obj(), map_bash_info::str_max, and ter().
Referenced by is_bashable_ter(), is_bashable_ter_furn(), and make_rubble().
|
inline |
Definition at line 1006 of file map.h.
References abs_sub, is_bashable_ter_furn(), and tripoint::z.
| bool map::is_bashable_ter_furn | ( | const tripoint & | p, |
| bool | allow_floor = false |
||
| ) | const |
Returns true if the furniture or terrain at p is bashable.
Definition at line 2437 of file map.cpp.
References is_bashable_furn(), and is_bashable_ter().
Referenced by is_bashable_ter_furn(), and vehicle::part_collision().
| bool map::is_cornerfloor | ( | const tripoint & | p | ) | const |
Definition at line 8709 of file map.cpp.
References impassable(), points_in_radius(), tripoint_north_east, tripoint_north_west, tripoint_south_east, and tripoint_south_west.
|
inline |
Definition at line 1049 of file map.h.
References abs_sub, is_divable(), and tripoint::z.
| bool map::is_divable | ( | const tripoint & | p | ) | const |
Returns whether or not the terrain at the given location can be dived into (by monsters that can swim or are aquatic or non-breathing).
| p | The coordinate to look at. |
Definition at line 2551 of file map.cpp.
References has_flag(), and TFLAG_DEEP_WATER.
Referenced by enchantment::is_active(), and is_divable().
| bool map::is_flammable | ( | const tripoint & | p | ) |
Returns true if there is a flammable item or field or the furn/terrain is flammable at p.
Definition at line 2635 of file map.cpp.
References fd_web, flammable_items_at(), get_field_intensity(), and has_flag().
| bool map::is_harvestable | ( | const tripoint & | pos | ) | const |
Returns true if point at pos is harvestable right now, with no extra tools.
Definition at line 1624 of file map.cpp.
References get_harvest(), and wrapped_vehicle::pos.
Referenced by npc::pick_up_item().
| bool map::is_last_ter_wall | ( | bool | no_furn, |
| const point & | p, | ||
| const point & | max, | ||
| direction | dir | ||
| ) | const |
Check if the last terrain is wall in direction NORTH, SOUTH, WEST or EAST.
| no_furn | if true, the function will stop and return false if it encounters a furniture |
| p | starting coordinates of check |
| max | ending coordinates of check |
| dir | Direction of check |
Definition at line 2566 of file map.cpp.
References EAST, has_flag_ter(), has_furn(), NORTH, SOUTH, WEST, point::x, and point::y.
Referenced by find_potential_computer_point().
|
inline |
| bool map::is_outside | ( | const tripoint & | p | ) | const |
Definition at line 2556 of file map.cpp.
References get_cache_ref(), inbounds(), level_cache::outside_cache, tripoint::x, tripoint::y, and tripoint::z.
Referenced by add_boardable(), board_up(), start_location::burn(), npc::can_move_to(), doors::close_door(), generate_weather_anim_frame(), game::handle_action(), weather::is_in_sunlight(), is_outside(), is_player_outside(), weather::is_sheltered(), monster::move(), avatar_action::move(), npc::move_to(), open(), random_outdoor_tile(), rate_location(), route(), spread_gas(), game::try_get_right_click_action(), and editmap::update_view_with_help().
| bool map::is_suspension_valid | ( | const tripoint & | point | ) |
Checks the four orientations in which a suspended tile could be valid, and returns if the tile is valid.
Definition at line 2955 of file map.cpp.
References t_open_air, ter(), tripoint_east, tripoint_north, tripoint_north_east, tripoint_north_west, tripoint_south, tripoint_south_east, tripoint_south_west, and tripoint_west.
Referenced by collapse_invalid_suspension(), and update_suspension_cache().
| bool map::is_transparent | ( | const tripoint & | p | ) | const |
Returns whether the tile at p is transparent(you can look past it).
Definition at line 624 of file lightmap.cpp.
References light_transparency(), and LIGHT_TRANSPARENCY_SOLID.
Referenced by ranged::execute_shaped_attack(), ranged::expected_coverage(), get_known_connections(), and shoot().
| bool map::is_wall_adjacent | ( | const tripoint & | center | ) | const |
Definition at line 1762 of file map.cpp.
References center, impassable(), and points_in_radius().
Referenced by ma_requirements::is_valid_character().
|
inline |
Definition at line 1053 of file map.h.
References abs_sub, is_water_shallow_current(), and tripoint::z.
| bool map::is_water_shallow_current | ( | const tripoint & | p | ) | const |
Definition at line 2546 of file map.cpp.
References has_flag(), and TFLAG_DEEP_WATER.
Referenced by is_water_shallow_current().
Definition at line 590 of file lightmap.cpp.
References BRIGHT, DARK, get_cache_ref(), inbounds(), LIGHT_AMBIENT_LIT, LIGHT_AMBIENT_LOW, LIGHT_SOURCE_BRIGHT, LIT, LOW, coords::sm, tripoint::x, tripoint::y, and tripoint::z.
| float map::light_transparency | ( | const tripoint & | p | ) | const |
Definition at line 629 of file lightmap.cpp.
References get_cache_ref(), level_cache::transparency_cache, tripoint::x, tripoint::y, and tripoint::z.
Referenced by generate_lightmap(), and is_transparent().
| void map::load | ( | const tripoint & | w, |
| bool | update_vehicles | ||
| ) |
Load submaps into grid.
This might create new submaps if the mapbuffer can not deliver the requested submap (as it does not exist on disc). This must be called before the map can be used at all!
| w | global coordinates of the submap at grid[0]. This is in submap coordinates. |
| update_vehicles | If true, add vehicles to the vehicle cache. |
Definition at line 6498 of file map.cpp.
References field_furn_locs, loadn(), my_MAPSIZE, reset_vehicle_cache(), set_abs_sub(), submaps_with_active_items, and traplocs.
Referenced by start_location::add_map_extra(), add_monsters(), start_location::burn(), talk_function::buy_100_logs(), talk_function::buy_10_logs(), create_lab_consoles(), debug_menu::debug(), construct::done_digormine_stair(), construct::done_mine_upstair(), farm_action(), talk_function::field_build_1(), talk_function::field_build_2(), talk_function::field_harvest(), talk_function::field_plant(), find_valid_teleporters_omt(), basecamp::form_crafting_inventory(), mission_start::kill_horde_master(), load(), game::load_map(), talk_function::loot_building(), editmap::mapgen_veh_destroy(), editmap::mapgen_veh_query(), MapExtras::mx_minefield(), om_cutdown_trees(), om_harvest_furn(), om_harvest_itm(), om_harvest_ter(), om_set_hide_site(), teleporter_list::place_avatar_overmap(), Character::place_corpse(), mission_start::place_deposit_box(), mission_start::place_dog(), mission_start::place_npc_software(), mission_start::place_priest_diary(), basecamp::place_results(), game::place_vehicle_nearby(), mission_start::place_zombie_mom(), start_location::prepare_map(), mission_start::ranch_nurse_1(), mission_start::ranch_nurse_2(), mission_start::ranch_nurse_3(), mission_start::ranch_nurse_4(), mission_start::ranch_nurse_5(), mission_start::ranch_nurse_6(), mission_start::ranch_nurse_7(), mission_start::ranch_nurse_8(), mission_start::ranch_nurse_9(), mission_start::ranch_scavenger_1(), mission_start::ranch_scavenger_2(), mission_start::ranch_scavenger_3(), mission_start::reveal_lab_train_depot(), debug_menu::spawn_nested_mapgen(), basecamp::start_relay_hide_site(), update_mapgen_function_json::update_map(), game::vertical_move(), and game::vertical_shift().
| void map::load | ( | const tripoint_abs_sm & | w, |
| bool | update_vehicles | ||
| ) |
Definition at line 6514 of file map.cpp.
References load(), and coords::coord_point< Point, Origin, Scale >::raw().
|
inlineprotected |
Definition at line 1693 of file map.h.
References abs_sub, add_roofs(), grid, loadn(), OVERMAP_DEPTH, OVERMAP_HEIGHT, tripoint::z, and zlevels.
|
protected |
Definition at line 6853 of file map.cpp.
References abs_sub, submap::active_items, actualize(), add_vehicle_to_cache(), vehicle::attach(), dbg, debugmsg, dirty_vehicle_list, active_item_cache::empty(), level_cache::field_cache, submap::field_count, generate(), generate_uniform(), get_cache(), get_nonant(), grid, Info, mapbuffer::lookup_submap(), MAPBUFFER, MAPSIZE, omt_to_sm_copy(), overmap_buffer, vehicle::part_count(), coords::coord_point< Point, Origin, Scale >::raw(), overmapbuffer::remove_vehicle(), reset_vehicle_cache(), set_floor_cache_dirty(), set_outside_cache_dirty(), set_pathfinding_cache_dirty(), set_seen_cache_dirty(), set_suspension_cache_dirty(), set_transparency_cache_dirty(), setsubmap(), vehicle::sm_pos, sm_to_omt_copy(), submaps_with_active_items, t_open_air, t_rock, overmapbuffer::ter(), tripoint::to_string(), vehicle::tracking_on, calendar::turn, submap::vehicles, tripoint::xy(), and tripoint::z.
| void map::make_active | ( | item_location & | loc | ) |
Update an item's active status, for example when adding hot or perishable liquid to a container.
Definition at line 4404 of file map.cpp.
References abs_sub, submap::active_items, active_item_cache::add(), active_item_cache::empty(), item_location::get_item(), submap::get_items(), item_stack::get_iterator_from_pointer(), get_submap_at(), item::needs_processing(), item_location::position(), SEEX, SEEY, submaps_with_active_items, tripoint::x, tripoint::y, and tripoint::z.
|
inline |
Definition at line 1034 of file map.h.
References f_rubble, make_rubble(), and t_dirt.
Definition at line 1031 of file map.h.
References make_rubble(), and t_dirt.
| void map::make_rubble | ( | const tripoint & | p, |
| const furn_id & | rubble_type, | ||
| bool | items, | ||
| const ter_id & | floor_type, | ||
| bool | overwrite = false |
||
| ) |
Generates rubble at the given location, if overwrite is true it just writes on top of what currently exists floor_type is only used if there is a non-bashable wall at the location or with overwrite = true.
Definition at line 2491 of file map.cpp.
References add_item_or_charges(), destroy(), destroy_furn(), f_rubble, f_rubble_rock, f_wreckage, furn_set(), impassable(), is_bashable_furn(), is_bashable_ter(), itype_nail, one_in(), rng(), spawn_item(), ter_set(), and calendar::turn.
Referenced by jmapgen_make_rubble::apply(), collapse_at(), draw_lab(), draw_mine(), make_rubble(), mapgen_crater(), MapExtras::mx_helicopter(), and MapExtras::mx_portal().
Definition at line 205 of file map.cpp.
References inbounds(), maptile_at_internal(), null_submap, and point_zero.
Definition at line 196 of file map.cpp.
References inbounds(), maptile_at_internal(), null_submap, and point_zero.
Referenced by editmap::draw_main_ui_overlay(), drawsq(), get_heat_radiation(), get_wind_blockers(), maptile_has_bounds(), supports_above(), and valid_move().
Definition at line 214 of file map.cpp.
References get_submap_at(), and coords::sm.
Referenced by draw(), maptile_at(), maptile_has_bounds(), process_fields_in_submap(), route(), and spread_gas().
|
private |
Definition at line 180 of file map_field.cpp.
References maptile_at(), and maptile_at_internal().
Referenced by get_neighbors().
| units::volume map::max_volume | ( | const tripoint & | p | ) |
Definition at line 4195 of file map.cpp.
References i_at(), and map_stack::max_volume().
| time_duration map::mod_field_age | ( | const tripoint & | p, |
| const field_type_id & | type, | ||
| const time_duration & | offset | ||
| ) |
Increment/decrement age of field entry at point.
-1_turns if not present (does not create a new field). Definition at line 5310 of file map.cpp.
References set_field_age(), and type.
Referenced by game::process_artifact().
| int map::mod_field_intensity | ( | const tripoint & | p, |
| const field_type_id & | type, | ||
| int | offset | ||
| ) |
Increment/decrement intensity of field entry at point, creating if not present, removing if intensity becomes 0.
Definition at line 5316 of file map.cpp.
References set_field_intensity(), and type.
Referenced by add_splatter(), and propagate_field().
|
protected |
Definition at line 1628 of file map_field.cpp.
References monster::add_effect(), monster::apply_damage(), Creature::check_dead_state(), Creature::cmat_flameres, Creature::cmat_flammable, Creature::cmat_flesh, Creature::cmat_fleshnveg, Creature::deal_damage(), monster::digging(), monster::digs(), DT_ACID, DT_ELECTRIC, DT_HEAT, effect_blind, effect_corroding, effect_onfire, effect_stunned, effect_webbed, fd_acid, fd_dazzling, fd_electricity, fd_fatigue, fd_fire, fd_flame_burst, fd_fungal_haze, fd_fungicidal_gas, fd_incendiary, fd_insecticidal_gas, fd_nuke_gas, fd_relax_gas, fd_sap, fd_sludge, fd_smoke, fd_tear_gas, fd_toxic_gas, fd_web, monster::flies(), FUNGUS, monster::get_armor_type(), get_field(), field_entry::get_field_intensity(), field_entry::get_field_type(), monster::has_flag(), mtype::has_flag(), mtype::in_species(), INSECT, field_entry::is_field_alive(), LIQUID, monster::made_of(), monster::made_of_any(), monster::make_fungus(), MF_ELECTRONIC, MF_FIREPROOF, MF_FIREY, MF_NO_BREATHE, MF_SEES, MF_SLUDGEPROOF, MF_WEBWALK, Creature::moves, num_bp, one_in(), monster::pos(), rng(), field_entry::set_field_intensity(), SPIDER, teleport::teleport(), monster::type, and veh_at().
Referenced by creature_in_field().
| bool map::mop_spills | ( | const tripoint & | p | ) |
Remove moppable fields/items at this location.
| p | the location |
Definition at line 2787 of file map.cpp.
References item_stack::begin(), vehicle_part::blood, item_stack::end(), vehicle_stack::erase(), fd_bile, fd_blood, fd_blood_insect, fd_blood_invertebrate, fd_blood_veggy, fd_gibs_flesh, fd_gibs_insect, fd_gibs_invertebrate, fd_gibs_veggy, fd_slime, fd_sludge, field_at(), vehicle::get_items(), has_flag(), i_at(), vehicle::part(), vehicle::parts_at_relative(), field::remove_field(), veh_at(), and vehicle::vehicle().
Definition at line 607 of file map.h.
References abs_sub, move_cost(), and tripoint::z.
Calculate the cost to move past the tile at p.
The move cost is determined by various obstacles, such as terrain, vehicles and furniture.
| Move Cost | Meaning |
|---|---|
| 0 | Impassable. Use passable/impassable to check for this. |
| n > 0 | x*n turns to move past this |
Definition at line 1774 of file map.cpp.
References furn(), furniture, inbounds(), move_cost_internal(), int_id< T >::obj(), ter(), terrain, and veh_at().
Referenced by combined_movecost(), draw_mine(), game::grabbed_veh_move(), place_trap_actor::is_allowed(), is_solid_neighbor(), mine_activity(), npc::move_away_from(), move_cost(), obstacle_coverage(), passable(), activity_handlers::pickaxe_finish(), game::print_terrain_info(), reachable_flood_steps(), deploy_furn_actor::use(), and game::walk_move().
|
private |
Internal versions of public functions to avoid checking same variables multiple times.
They lack safety checks, because their callers already do those.
Definition at line 1737 of file map.cpp.
References furniture, vpart_position::obstacle_at_part(), vpart_position::part_with_feature(), terrain, and VPFLAG_AISLE.
Referenced by move_cost(), route(), and update_pathfinding_cache().
|
inline |
Definition at line 624 of file map.h.
References abs_sub, move_cost_ter_furn(), and tripoint::z.
| int map::move_cost_ter_furn | ( | const tripoint & | p | ) | const |
Similar behavior to move_cost(), but ignores vehicles.
Definition at line 1799 of file map.cpp.
References submap::get_furn(), get_submap_at(), submap::get_ter(), inbounds(), map_data_common_t::movecost, and int_id< T >::obj().
Referenced by move_cost_ter_furn(), vehicle::part_collision(), passable_ter_furn(), and vehicle_wheel_traction().
Definition at line 515 of file map.cpp.
References _, Character::activity, add_msg(), vehicle::adjust_zlevel(), vehicle::check_falling_or_floating(), vehicle::collision(), sounds::combat, vehicle::damage(), vehicle::damage_all(), debugmsg, tileray::dir(), vehicle::disp_name(), displace_vehicle(), displace_water(), vehicle::do_towing_move(), DT_BASH, vehicle::face, g, get_player_character(), vehicle::get_points(), towing_data::get_towed(), vehicle::global_part_pos3(), vehicle::global_pos3(), vehicle::handle_trap(), has_flag(), tileray::init(), vehicle::invalidate_towing(), vehicle::is_falling, vehicle::is_flying_in_air(), vehicle::is_in_water(), vehicle::is_rotorcraft(), vehicle::is_towing(), vehicle::last_turn, m_info, vehicle_part::mount, vehicle::move, move_vehicle(), sounds::movement, vehicle::name, vehicle::on_move(), one_in(), OVERMAP_HEIGHT, vehicle::part(), vehicle::part_count(), vehicle::part_info(), vehicle::pivot_displacement(), vehicle::pivot_point(), point_zero, vehicle::possibly_recover_from_skid(), vehicle::precalc_mounts(), ui_manager::redraw_invalidated(), refresh_display(), vehicle_part::removed, vpart_info::rotor_diameter(), sees_veh(), sgn(), shake_vehicle(), vehicle::shift_zlevel(), vehicle::skidding, vehicle::sm_pos, smash_items(), sounds::sound(), vehicle::stop(), vehicle::stop_autodriving(), string_format(), t_dirt, t_dirtmound, t_grass, ter(), ter_set(), units::to_kilogram(), vehicle::total_mass(), vehicle::tow_cable_too_far(), vehicle::tow_data, tripoint_zero, vehicle::turn(), vehicle::turn_dir, vehicle::valid_wheel_config(), veh_at(), veh_coll_veh, veh_pointer_or_null(), vehicle_vehicle_collision(), vehicle_wheel_traction(), vehicle::velocity, vehicle::vertical_velocity, vehicle_part::wheel_area(), vehicle::wheelcache, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by vehicle::act_on_map(), and move_vehicle().
|
inline |
| std::string map::name | ( | const tripoint & | p | ) |
Definition at line 1319 of file map.cpp.
References furnname(), has_furn(), and tername().
Referenced by add_camp(), add_computer(), add_spawn(), doors::close_door(), disp_name(), game::disp_NPCs(), game::examine(), game::get_dangerous_tile(), pickup::handle_spillable_contents(), game::list_monsters(), name(), obstacle_name(), place_spawns(), deploy_tent_actor::use(), and game::walk_move().
Returns coverage of target in relation to the observer.
Target is loc2, observer is loc1. First tile from the target is an obstacle, which has the coverage value. If there's no obstacle adjacent to the target - no coverage.
Definition at line 6187 of file map.cpp.
References a, bresenham(), map_data_common_t::coverage, furn(), has_flag_ter(), move_cost(), ter(), TFLAG_FLAT, veh_at(), VPFLAG_AISLE, tripoint::x, and tripoint::y.
| std::string map::obstacle_name | ( | const tripoint & | p | ) |
Returns the name of the obstacle at p that might be blocking movement/projectiles/etc.
Note that this only accounts for vehicles, terrain, and furniture.
Definition at line 1329 of file map.cpp.
References name(), and veh_at().
Referenced by avatar_action::move().
| void map::on_vehicle_moved | ( | int | smz | ) |
Callback invoked when a vehicle has moved.
Definition at line 400 of file map.cpp.
References set_floor_cache_dirty(), set_outside_cache_dirty(), set_pathfinding_cache_dirty(), and set_transparency_cache_dirty().
Referenced by vehicle::act_on_map(), and displace_vehicle().
| bool map::open_door | ( | const tripoint & | p, |
| bool | inside, | ||
| bool | check_only = false |
||
| ) |
Definition at line 3857 of file map.cpp.
References _, AEP_SCHIZO, furn(), furn_set(), g, has_flag(), int_id< T >::id(), sounds::movement, int_id< T >::obj(), one_in(), sounds::sound(), string_id< T >::str(), ter(), ter_set(), veh_at(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by npc::can_open_door(), monster::move(), avatar_action::move(), npc::move_to(), open(), and rate_location().
| partial_con * map::partial_con_at | ( | const tripoint & | p | ) |
Definition at line 5135 of file map.cpp.
References get_submap_at(), inbounds(), submap::partial_constructions, and tripoint::z.
Referenced by complete_construction(), and player_activity::get_progress_message().
| void map::partial_con_remove | ( | const tripoint & | p | ) |
Definition at line 5149 of file map.cpp.
References get_submap_at(), inbounds(), submap::partial_constructions, and tripoint::z.
Referenced by complete_construction().
| void map::partial_con_set | ( | const tripoint & | p, |
| const partial_con & | con | ||
| ) |
Definition at line 5159 of file map.cpp.
References debugmsg, get_submap_at(), inbounds(), submap::partial_constructions, and tripoint::z.
|
inline |
Definition at line 615 of file map.h.
References abs_sub, passable(), and tripoint::z.
| bool map::passable | ( | const tripoint & | p | ) | const |
Definition at line 1794 of file map.cpp.
References move_cost().
Referenced by npc::can_move_to(), npc::could_move_onto(), iexamine::elevator(), ranged::execute_shaped_attack(), ranged::expected_coverage(), game::fling_creature(), generate(), npc::go_to_omt_destination(), game::grabbed_furn_move(), hit_with_acid(), hit_with_fire(), impassable(), game::is_empty(), npc::move_to(), MapExtras::mx_collegekids(), MapExtras::mx_corpses(), MapExtras::mx_house_spider(), MapExtras::mx_looters(), MapExtras::mx_marloss_pilgrimage(), MapExtras::mx_military(), MapExtras::mx_roadblock(), MapExtras::mx_science(), MapExtras::mx_supplydrop(), nearest_passable(), passable(), process_fields_in_submap(), avatar_action::ramp_move(), rate_location(), spawn_monsters_submap_group(), activity_handlers::travel_do_turn(), place_npc_iuse::use(), valid_move(), and game::vertical_move().
| bool map::passable_ter_furn | ( | const tripoint & | p | ) | const |
Definition at line 1827 of file map.cpp.
References move_cost_ter_furn().
Referenced by impassable_ter_furn(), and avatar_action::move().
| bool map::pl_line_of_sight | ( | const tripoint & | t, |
| int | max_range | ||
| ) | const |
Uses the map cache to tell if the player could see the given square.
pl_sees implies pl_line_of_sight Used for infrared.
Definition at line 764 of file lightmap.cpp.
References g, get_cache_ref(), inbounds(), square_dist(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by get_heat_radiation().
| bool map::pl_sees | ( | const tripoint & | t, |
| int | max_range | ||
| ) | const |
Whether the player character (g->u) can see the given square (local map coordinates).
This only checks the transparency of the path to the target, the light level is not checked.
| t | Target point to look at |
| max_range | All squares that are further away than this are invisible. Ignored if smaller than 0. |
Definition at line 746 of file lightmap.cpp.
References a, apparent_light_helper(), g, get_cache_ref(), inbounds(), square_dist(), tripoint::x, tripoint::y, and tripoint::z.
| void map::place_gas_pump | ( | const point & | p, |
| int | charges | ||
| ) |
Definition at line 5447 of file mapgen.cpp.
References one_in(), and place_gas_pump().
| void map::place_gas_pump | ( | const point & | p, |
| int | charges, | ||
| const std::string & | fuel_type | ||
| ) |
Definition at line 5439 of file mapgen.cpp.
References add_item(), item::charges, item::fuel_pump_terrain(), calendar::start_of_cataclysm, ter_id, and ter_set().
Referenced by jmapgen_gaspump::apply(), mapgen_tutorial(), and place_gas_pump().
|
inline |
Definition at line 1337 of file map.h.
References abs_sub, place_items(), calendar::turn, and tripoint::z.
| std::vector< item * > map::place_items | ( | const item_group_id & | loc, |
| int | chance, | ||
| const tripoint & | p1, | ||
| const tripoint & | p2, | ||
| bool | ongrass, | ||
| const time_point & | turn, | ||
| int | magazine = 0, |
||
| int | ammo = 0 |
||
| ) |
Place items from item group in the rectangle f - t.
Several items may be spawned on different places. Several items may spawn at once (at one place) when the item group says so (uses item_group::items_from which may return several items at once).
| loc | Current location of items to be placed |
| chance | Chance for more items. A chance of 100 creates 1 item all the time, otherwise it's the chance that more items will be created (place items until the random roll with that chance fails). The chance is used for the first item as well, so it may not spawn an item at all. Values <= 0 or > 100 are invalid. |
| p1 | One corner of rectangle in which to spawn items |
| p2 | Second corner of rectangle in which to spawn items |
| ongrass | If false the items won't spawn on flat terrain (grass, floor, ...). |
| turn | The birthday that the created items shall have. |
| magazine | percentage chance item will contain the default magazine |
| ammo | percentage chance item will be filled with default ammo |
Definition at line 5513 of file mapgen.cpp.
References abs_sub, string_id< T >::c_str(), debugmsg, get_abs_sub(), oter_t::get_mapgen_id(), item_group::group_is_defined(), int_id< T >::id(), int_id< T >::obj(), coords::omt, overmap_buffer, put_items_from_loc(), rng(), roll_remainder(), sm_to_omt_copy(), ter(), overmapbuffer::ter(), terrain, calendar::turn, point::x, tripoint::x, point::y, tripoint::y, and tripoint::z.
Referenced by jmapgen_item_group::apply(), draw_lab(), draw_mine(), draw_office_tower(), draw_slimepit(), mapgen_ants_food(), mapgen_ants_generic(), mapgen_ants_larvae(), mapgen_ants_queen(), mapgen_cavern(), mapgen_crater(), mapgen_field(), mapgen_forest(), mapgen_forest_trail_curved(), mapgen_forest_trail_four_way(), mapgen_forest_trail_straight(), mapgen_forest_trail_tee(), mapgen_highway(), mapgen_hive(), mapgen_parking_lot(), mapgen_road(), mapgen_sewer_curved(), mapgen_sewer_four_way(), mapgen_sewer_straight(), mapgen_sewer_tee(), MapExtras::mx_collegekids(), MapExtras::mx_drugdeal(), MapExtras::mx_house_spider(), MapExtras::mx_house_wasp(), MapExtras::mx_military(), MapExtras::mx_minefield(), MapExtras::mx_roadblock(), MapExtras::mx_roadworks(), MapExtras::mx_science(), MapExtras::mx_supplydrop(), place_items(), place_vending(), mission_start::ranch_nurse_8(), mission_start::ranch_scavenger_1(), mission_start::ranch_scavenger_2(), mission_start::ranch_scavenger_3(), and science_room().
| character_id map::place_npc | ( | const point & | p, |
| const string_id< npc_template > & | type, | ||
| bool | force = false |
||
| ) |
Definition at line 5480 of file mapgen.cpp.
References abs_sub, character_id, overmapbuffer::insert_npc(), overmap_buffer, trait_NPC_STATIC_NPC, type, tripoint::xy(), and tripoint::z.
Referenced by jmapgen_npc::apply(), mapgen_hive(), MapExtras::mx_bandits_block(), MapExtras::mx_looters(), MapExtras::mx_marloss_pilgrimage(), mission_start::ranch_nurse_9(), and place_npc_iuse::use().
| void map::place_spawns | ( | const mongroup_id & | group, |
| int | chance, | ||
| const point & | p1, | ||
| const point & | p2, | ||
| float | density, | ||
| bool | individual = false, |
||
| bool | friendly = false, |
||
| const std::string & | name = "NONE", |
||
| int | mission_id = -1 |
||
| ) |
Definition at line 5389 of file mapgen.cpp.
References add_spawn(), string_id< T >::c_str(), debugmsg, friendly, get_abs_sub(), oter_t::get_mapgen_id(), MonsterGroupManager::GetResultFromGroup(), int_id< T >::id(), impassable(), MonsterGroupManager::is_animal(), name(), MonsterGroupResult::name, num, coords::omt, one_in(), overmap_buffer, MonsterGroupResult::pack_size, rng(), rng_float(), roll_remainder(), sm_to_omt_copy(), overmapbuffer::ter(), point::x, and point::y.
Referenced by add_monsters(), jmapgen_monster_group::apply(), create_anomaly(), draw_lab(), draw_mine(), draw_office_tower(), draw_slimepit(), draw_temple(), draw_triffid(), mapgen_road(), MapExtras::mx_collegekids(), MapExtras::mx_corpses(), MapExtras::mx_drugdeal(), MapExtras::mx_military(), MapExtras::mx_pond(), MapExtras::mx_portal(), MapExtras::mx_portal_in(), MapExtras::mx_science(), and science_room().
| void map::place_toilet | ( | const point & | p, |
| int | charges = 6 * 4 |
||
| ) |
Definition at line 5452 of file mapgen.cpp.
References add_item(), item::charges, f_toilet, furn_set(), and calendar::start_of_cataclysm.
Referenced by jmapgen_toilet::apply(), and mapf::formatted_set_simple().
| void map::place_vending | ( | const point & | p, |
| const item_group_id & | type, | ||
| bool | reinforced = false |
||
| ) |
Definition at line 5460 of file mapgen.cpp.
References abs_sub, f_vending_c, f_vending_o, f_vending_reinforced, furn_set(), one_in(), place_items(), points_in_radius(), rng(), spawn_item(), calendar::start_of_cataclysm, type, and tripoint::z.
Referenced by jmapgen_vending_machine::apply().
|
protected |
Definition at line 1220 of file map_field.cpp.
References _, Creature::add_effect(), Creature::add_env_effect(), add_msg(), player::add_msg_if_player(), player::add_msg_player_or_npc(), bio_heatsink, body_part_name_accusative(), bp_arm_l, bp_arm_r, bp_eyes, bp_foot_l, bp_foot_r, bp_hand_l, bp_hand_r, bp_head, bp_leg_l, bp_leg_r, bp_mouth, bp_torso, burn_body_part(), Creature::check_dead_state(), convert_bp(), item::covers(), Character::deal_damage(), DT_ELECTRIC, DT_HEAT, effect_badpoison, effect_blind, effect_fungus, effect_onfire, effect_poison, effect_stung, effect_teargas, effect_webbed, field_entry::extra_radiation_max(), field_entry::extra_radiation_min(), fd_acid, fd_acid_vent, fd_bees, fd_dazzling, fd_electricity, fd_fatigue, fd_fire, fd_flame_burst, fd_fungal_haze, fd_fungicidal_gas, fd_incendiary, fd_insecticidal_gas, fd_sap, fd_shock_vent, fd_sludge, fd_tear_gas, fd_web, flag_GAS_PROOF(), Creature::get_all_body_parts(), Character::get_armor_cut(), item::get_coverage(), Character::get_env_resist(), get_field(), field_entry::get_field_intensity(), field_entry::get_field_type(), Character::get_highest_category(), Creature::get_random_body_part(), Character::has_active_bionic(), Character::has_trait(), Character::has_two_arms(), Character::hp_to_bp(), Character::hurtall(), string_id< T >::id(), Character::in_vehicle, Character::irradiate(), Character::is_elec_immune(), field_entry::is_field_alive(), Character::is_on_ground(), player::is_player(), Creature::is_underwater(), Character::is_wearing(), itype_rm13_armor_on, m_bad, m_warning, player::mod_pain(), Creature::moves, field_entry::name(), num_bp, num_hp_parts, one_in(), Character::pos(), field_entry::radiation_hurt_damage_max(), field_entry::radiation_hurt_damage_min(), field_entry::radiation_hurt_message(), rng(), field_entry::set_field_intensity(), teleport::teleport(), dealt_damage_instance::total_damage(), trait_ACIDPROOF, trait_ELECTRORECEPTORS, trait_M_IMMUNE, trait_M_SKIN2, trait_M_SKIN3, trait_THRESH_MARLOSS, trait_THRESH_MYCUS, trait_WEB_WALKER, translate_marker, dealt_damage_instance::type_damage(), veh_at(), Character::worn, Character::worn_with_flag(), and x_in_y().
Referenced by creature_in_field().
| bool map::point_within_camp | ( | const tripoint & | point_check | ) | const |
Definition at line 5535 of file map.cpp.
References overmapbuffer::find_camp(), ms_to_omt_copy(), overmap_buffer, coords::coord_point< Point, Origin, Scale >::xy(), and tripoint::z.
Referenced by npc::worker_downtime().
| tripoint_range< tripoint > map::points_in_radius | ( | const tripoint & | center, |
| size_t | radius, | ||
| size_t | radiusz = 0 |
||
| ) | const |
Definition at line 8426 of file map.cpp.
References center, my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, and SEEX.
Referenced by add_splash(), npc::alt_attack(), npc::assess_danger(), bash_furn_success(), build_vision_transparency_cache(), deploy_tent_actor::check_intact(), climb_difficulty(), collapse_at(), collapse_check(), complete_construction(), game::control_vehicle(), displace_water(), enumerate_objects_around_point(), ranged::execute_shaped_attack(), ranged::expected_coverage(), computer_session::failure_manhacks(), computer_session::failure_secubots(), find_furnitures_with_flag_in_radius(), find_potential_computer_point(), game::forced_door_closing(), basecamp::form_crafting_inventory(), inventory::form_from_map(), get_creatures_in_radius(), get_heat_radiation(), npc::go_to_omt_destination(), has_adjacent_furniture_with(), has_nearby_chair(), has_nearby_fire(), has_nearby_table(), has_neighbor(), is_cornerfloor(), is_wall_adjacent(), game::monmove(), npc::move_away_from(), MapExtras::mx_casings(), MapExtras::mx_corpses(), MapExtras::mx_looters(), MapExtras::mx_marloss_pilgrimage(), MapExtras::mx_mayhem(), MapExtras::mx_minefield(), MapExtras::mx_portal(), MapExtras::mx_portal_in(), iuse::note_bionics(), trap::on_disarmed(), photo_def_for_camera_point(), game::place_critter_around(), mission_start::place_deposit_box(), place_vending(), game::process_artifact(), process_fields_in_submap(), propagate_suspension_check(), avatar_action::ramp_move(), reachable_flood_steps(), mattack::shriek_stun(), spawn_monsters_submap(), mdeath::splatter(), spread_gas(), monster::stumble(), activity_handlers::travel_do_turn(), explosion_iuse::trigger_explosion(), place_trap_actor::use(), deploy_tent_actor::use(), use_amount(), game::vertical_move(), and npc::worker_downtime().
| tripoint_range< tripoint > map::points_in_rectangle | ( | const tripoint & | from, |
| const tripoint & | to | ||
| ) | const |
Definition at line 8416 of file map.cpp.
References my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, SEEX, tripoint::x, tripoint::y, and tripoint::z.
Referenced by apply_faction_ownership(), debug_menu::debug(), draw_lab(), farm_action(), game::find_or_make_stairs(), generate_lightmap(), jmapgen_setmap::has_vehicle_collision(), avatar_action::move(), MapExtras::mx_portal(), om_cutdown_trees(), om_harvest_furn(), om_harvest_itm(), and om_harvest_ter().
| tripoint_range< tripoint > map::points_on_zlevel | ( | ) | const |
Yields a range of all points that are contained in the map and have the z-level of this map (abs_sub).
Definition at line 8447 of file map.cpp.
References abs_sub, points_on_zlevel(), and tripoint::z.
Referenced by computer_session::action_srcf_elevator(), start_location::burn(), editmap::draw_main_ui_overlay(), talk_function::field_harvest(), talk_function::field_plant(), find_potential_computer_point(), find_valid_teleporters_omt(), get_changed_ids_from_update(), talk_function::loot_building(), iexamine::pedestal_wyrm(), Character::place_corpse(), mission_start::place_deposit_box(), mission_start::place_priest_diary(), points_on_zlevel(), start_location::prepare_map(), random_outdoor_tile(), resolve_regional_terrain_and_furniture(), mission_start::reveal_lab_train_depot(), translate(), translate_radius(), and game::update_stair_monsters().
| tripoint_range< tripoint > map::points_on_zlevel | ( | int | z | ) | const |
Same as above, but uses the specific z-level.
If the given z-level is invalid, it returns an empty range.
Definition at line 8437 of file map.cpp.
References my_MAPSIZE, OVERMAP_HEIGHT, SEEX, SEEY, tripoint_above, and tripoint_zero.
| void map::process_falling | ( | ) |
Invoked drop_everything on cached dirty tiles.
Definition at line 2268 of file map.cpp.
References add_msg(), drop_everything(), m_debug, avatar_action::move(), support_cache_dirty, and zlevels.
Referenced by game::do_turn().
| void map::process_fields | ( | ) |
Definition at line 141 of file map_field.cpp.
References abs_sub, level_cache::field_cache, get_cache(), get_submap_at_grid(), MAPSIZE, my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, process_fields_in_submap(), tripoint::z, and zlevels.
Referenced by game::do_turn().
Definition at line 394 of file map_field.cpp.
References _, abs_sub, mattack::acid(), add_field(), add_item_or_charges(), add_msg(), add_spawn(), adjust_radiation(), scent_block::apply_slime(), field_type::apply_slime_factor, field::begin(), item_stack::begin(), check_flammable(), clear_path(), scent_block::commit_modifications(), detail::count(), create_burnproducts(), create_hot_air(), vehicle::damage(), debugmsg, destroy(), destroyed, item::detonate(), dice(), field_type::dirty_transparency_cache, field::displayed_field_type(), DT_BASH, DT_HEAT, eight_horizontal_neighbors, field::end(), item_stack::end(), map_stack::erase(), explosive, field_entry::extra_radiation_max(), field_entry::extra_radiation_min(), f_ash, f_null, fd_acid, fd_acid_vent, fd_bees, fd_dazzling, fd_electricity, fd_fatigue, fd_fire, fd_fire_vent, fd_flame_burst, fd_fungal_haze, fd_fungicidal_gas, fd_gas_vent, fd_incendiary, fd_insecticidal_gas, fd_laser, fd_nuke_gas, fd_null, fd_plasma, fd_push_items, fd_relax_gas, fd_shock_vent, fd_smoke, fd_smoke_vent, fd_tear_gas, fd_toxic_gas, fd_web, field_at(), level_cache::field_cache, submap::field_count, maptile::find_field(), field::find_field(), flag_FUNGUS(), flammable_items_at(), fire_data::fuel_produced, furn_set(), g, field_entry::gas_can_spread(), get_cache(), submap::get_field(), get_field(), field_entry::get_field_age(), field_entry::get_field_intensity(), field_entry::get_field_type(), maptile::get_furn_t(), maptile::get_item_count(), get_neighbors(), get_submap_at_grid(), maptile::get_ter(), maptile::get_ter_t(), field_type::get_transparent(), field_entry::get_underwater_age_speedup(), MonsterGroupManager::GetResultFromGroup(), map_data_common_t::has_flag(), has_flag(), i_at(), int_id< T >::id(), ter_t::id, string_id< T >::id(), impassable(), field_entry::intensity_upgrade_chance(), field_entry::intensity_upgrade_duration(), field_entry::is_field_alive(), itype_rock, m_bad, MAPSIZE, maptile_at_internal(), field_entry::mod_field_age(), field_entry::monster_spawn_chance(), field_entry::monster_spawn_count(), field_entry::monster_spawn_group(), field_entry::monster_spawn_radius(), MonsterGroupResult::name, field_type::npc_complain_data, int_id< T >::obj(), calendar::once_every(), one_in(), field_type::outdoor_age_speedup, OVERMAP_DEPTH, OVERMAP_HEIGHT, MonsterGroupResult::pack_size, passable(), field_type::percent_spread, point_zero, points_in_radius(), maptile::pos_, random_entry(), random_entry_removed(), random_point(), field::remove_field(), rl_dist(), rng(), roll_remainder(), SEEX, SEEY, item::set_age(), field_entry::set_field_age(), field_entry::set_field_intensity(), set_seen_cache_dirty(), set_transparency_cache_dirty(), spawn_items(), fungal_effects::spread_fungus(), spread_gas(), squares_in_direction(), t_dirt, t_open_air, t_pit, ter(), ter_furn_has_flag(), ter_set(), TFLAG_ALLOW_FIELD_EFFECT, TFLAG_FIRE_CONTAINER, TFLAG_FLAMMABLE, TFLAG_FLAMMABLE_ASH, TFLAG_FLAMMABLE_HARD, TFLAG_NO_FLOOR, TFLAG_SEALED, TFLAG_SWIMMABLE, item::tname(), valid_move(), veh_at_internal(), field_type::wandering_field, point::x, tripoint::x, tripoint::xy(), point::y, tripoint::y, tripoint::z, and zlevels.
Referenced by process_fields().
| void map::process_items | ( | ) |
Definition at line 4582 of file map.cpp.
References abs_sub, access_cache(), submap::active_items, active_item_cache::empty(), get_submap_at_grid(), vehicle::global_pos3(), OVERMAP_DEPTH, OVERMAP_HEIGHT, wrapped_vehicle::pos, process_items_in_submap(), process_items_in_vehicles(), SEEX, SEEY, submaps_with_active_items, level_cache::vehicle_list, tripoint::x, tripoint::xy(), tripoint::y, tripoint::z, and zlevels.
Referenced by game::do_turn().
Definition at line 4610 of file map.cpp.
References submap::active_items, f_fridge_on, f_minifreezer_on, furn(), active_item_cache::get_for_processing(), i_at(), process_map_items(), SEEX, SEEY, t_rootcellar, TEMP_FREEZER, TEMP_FRIDGE, TEMP_NORMAL, TEMP_ROOT_CELLAR, ter(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by process_items().
Definition at line 4661 of file map.cpp.
References vehicle::active_items, submap::contains_vehicle(), vehicle_part::enabled, vehicle::engine_on, vehicle::get_any_parts(), active_item_cache::get_for_processing(), vehicle::get_items(), vehicle::get_parts_including_carried(), vpart_info::has_flag(), vehicle::has_part(), vehicle_part::info(), itype::insulation_factor, item::is_corpse(), item::is_food(), item::is_food_container(), vpart_info::item, vpart_position::mount(), process_map_items(), process_vehicle_items(), TEMP_FREEZER, TEMP_FRIDGE, TEMP_HEATER, TEMP_NORMAL, VPFLAG_CARGO, VPFLAG_FLUIDTANK, VPFLAG_FREEZER, and VPFLAG_FRIDGE.
Referenced by process_items_in_vehicles().
|
private |
Definition at line 4640 of file map.cpp.
References submap::contains_vehicle(), process_items_in_vehicle(), and submap::vehicles.
Referenced by process_items().
|
protected |
Produce sap on tapped maple trees.
| p | Location of tapped tree |
| time_since_last_actualize | Time since this function has been called the last time. |
Definition at line 7105 of file map.cpp.
References item::charges, i_at(), one_in(), item::poison, roll_remainder(), calendar::season_length(), t_tree_maple_tapped, ter(), time_past_new_year(), calendar::turn, and calendar::year_length().
Referenced by actualize().
| void map::propagate_field | ( | const tripoint & | center, |
| const field_type_id & | type, | ||
| int | amount, | ||
| int | max_intensity = 0 |
||
| ) |
Definition at line 1937 of file map_field.cpp.
References center, GAS, get_field_intensity(), has_flag(), impassable(), mod_field_intensity(), open(), random_entry_removed(), rl_dist(), TFLAG_PERMEABLE, and type.
Referenced by emit_field().
| void map::propagate_suspension_check | ( | const tripoint & | point | ) |
Checks surrounding tiles for suspension, and has them check for collapse.
!!Should only be called after the tile at this point has been destroyed!!
Definition at line 2936 of file map.cpp.
References collapse_invalid_suspension(), has_flag(), points_in_radius(), and TFLAG_SUSPENDED.
Referenced by bash_ter_success(), collapse_at(), and collapse_invalid_suspension().
| std::vector< item * > map::put_items_from_loc | ( | const item_group_id & | loc, |
| const tripoint & | p, | ||
| const time_point & | turn = calendar::start_of_cataclysm |
||
| ) |
Place items from an item group at p.
Places as much items as the item group says. (Most item groups are distributions and will only create one item.)
| loc | Current location of items |
| p | Destination of items |
| turn | The birthday that the created items shall have. |
Definition at line 5571 of file mapgen.cpp.
References item_group::items_from(), spawn_items(), and calendar::turn.
Referenced by add_corpse(), mapgen_cavern(), MapExtras::mx_corpses(), MapExtras::mx_grave(), MapExtras::mx_mayhem(), MapExtras::mx_minefield(), and place_items().
|
protected |
Radiation-related plant (and fungus?) death.
Definition at line 7202 of file map.cpp.
References f_null, furn(), furn_set(), get_radiation(), map_data_common_t::has_flag(), i_clear(), int_id< T >::obj(), t_dirt, t_grass, t_tree_birch, t_tree_hickory, t_tree_hickory_harvested, t_tree_pine, t_tree_willow, t_tree_young, ter(), ter_set(), and x_in_y().
Referenced by actualize().
| point map::random_outdoor_tile | ( | ) |
Definition at line 2723 of file map.cpp.
References is_outside(), PATH_INFO::options(), point_north_west, points_on_zlevel(), and random_entry().
| double map::ranged_target_size | ( | const tripoint & | p | ) | const |
Size of map objects at p for purposes of ranged combat.
Size is in percentage of tile: if 1.0, all attacks going through tile should hit map objects on it, if 0.0 there is nothing to be hit (air/water).
Definition at line 1949 of file map.cpp.
References has_floor(), and impassable().
| void map::reachable_flood_steps | ( | std::vector< tripoint > & | reachable_pts, |
| const tripoint & | f, | ||
| int | range, | ||
| int | cost_min, | ||
| int | cost_max | ||
| ) | const |
Populates a vector of points that are reachable within a number of steps from a point.
It could be generalized to take advantage of z levels, but would need some additional code to detect whether a valid transition was on a tile.
Does the following:
Definition at line 6254 of file map.cpp.
References has_floor_or_support(), left, move_cost(), points_in_radius(), right, point::x, tripoint::x, tripoint::xy(), point::y, tripoint::y, and tripoint::z.
Referenced by inventory::form_from_map(), and use_charges().
| void map::register_vehicle_zone | ( | vehicle * | veh, |
| int | zlev | ||
| ) |
Definition at line 951 of file map.cpp.
References get_cache().
| void map::remove_field | ( | const tripoint & | p, |
| const field_type_id & | field_to_remove | ||
| ) |
Remove field entry at xy, ignored if the field entry is not present.
Definition at line 5447 of file map.cpp.
References level_cache::field_cache, submap::field_count, get_cache(), submap::get_field(), get_submap_at(), inbounds(), MAPSIZE, int_id< T >::obj(), field::remove_field(), SEEX, set_pathfinding_cache_dirty(), set_seen_cache_dirty(), set_transparency_cache_dirty(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by bash_field(), game::grabbed_furn_move(), MapExtras::mx_house_spider(), MapExtras::mx_spider(), game::process_artifact(), set_field_intensity(), shoot(), smash(), and game::walk_move().
|
protected |
Go through the list of items, update their rotten status and remove items that have rotten away completely.
| items | items to remove |
| p | The point on this map where the items are, used for rot calculation. |
Definition at line 6951 of file map.cpp.
References i_rem(), and rotten_item_spawn().
Referenced by actualize().
| void map::remove_submap_camp | ( | const tripoint & | p | ) |
Definition at line 5550 of file map.cpp.
References submap::camp, and get_submap_at().
Referenced by game::validate_camps().
| void map::remove_trap | ( | const tripoint & | p | ) |
Definition at line 5255 of file map.cpp.
References detail::find(), g, get_map(), get_submap_at(), submap::get_trap(), inbounds(), int_id< T >::obj(), submap::set_trap(), int_id< T >::to_i(), tr_null, and traplocs.
Referenced by complete_construction(), vehicle::handle_trap(), trapfunc::map_regen(), mremove_trap(), trap::on_disarmed(), game::process_artifact(), and trap_set().
| void map::reset_vehicle_cache | ( | ) |
Definition at line 249 of file map.cpp.
References abs_sub, add_vehicle_to_cache(), clear_vehicle_cache(), get_cache(), last_full_vehicle_list_dirty, OVERMAP_DEPTH, OVERMAP_HEIGHT, tripoint_zero, tripoint::z, and zlevels.
Referenced by veh_interact::complete_vehicle(), detach_vehicle(), editmap::draw_main_ui_overlay(), load(), loadn(), editmap::mapgen_veh_destroy(), rotate(), shift(), and vehicle::use_bike_rack().
|
protected |
Try to grow fruits on static plants (not planted by the player)
| p | Place to restock |
| time_since_last_actualize | Time since this function has been called the last time. |
Definition at line 7091 of file map.cpp.
References int_id< T >::obj(), calendar::season_length(), season_of_year(), ter(), ter_set(), TFLAG_HARVESTED, and calendar::turn.
Referenced by actualize(), and saven().
| void map::rotate | ( | int | turns, |
| bool | setpos_safe = false |
||
| ) |
Rotates this map, and all of its contents, by the specified multiple of 90 degrees.
| turns | How many 90-degree turns to rotate the map. |
Definition at line 5798 of file mapgen.cpp.
References abs_sub, clear_vehicle_cache(), clear_vehicle_list(), real_coords::fromabs(), get_abs_sub(), zone_manager::get_manager(), get_map(), overmapbuffer::get_npcs_near(), get_submap_at_grid(), Character::getID(), getlocal(), npc::global_square_location(), HALF_MAPSIZE, overmapbuffer::insert_npc(), real_coords::om_pos, real_coords::om_sub, overmap_buffer, point_east, point_south, point_south_east, point_zero, overmapbuffer::remove_npc(), reset_vehicle_cache(), point::rotate(), zone_manager::rotate_zones(), SEEX, SEEY, npc::setpos(), coords::sm, npc::spawn_at_precise(), real_coords::sub_pos, cata::swap(), update_vehicle_list(), point::x, tripoint::x, tripoint::xy(), point::y, tripoint::y, and tripoint::z.
Referenced by draw_connections(), draw_lab(), draw_office_tower(), draw_triffid(), mapgen_function_json::generate(), mapgen_ants_curved(), mapgen_ants_straight(), mapgen_ants_tee(), mapgen_forest_trail_curved(), mapgen_forest_trail_straight(), mapgen_forest_trail_tee(), mapgen_highway(), mapgen_parking_lot(), editmap::mapgen_preview(), mapgen_railroad(), mapgen_railroad_bridge(), mapgen_river_curved(), mapgen_river_curved_not(), mapgen_river_straight(), mapgen_road(), mapgen_rotate(), mapgen_sewer_curved(), mapgen_sewer_straight(), mapgen_sewer_tee(), mapgen_subway(), and update_mapgen_function_json::update_map().
Checks to see if the item that is rotting away generates a creature when it does.
| item | item that is spawning creatures |
| p | The point on this map where the item is and creature will be |
Definition at line 6965 of file map.cpp.
References _, add_msg(), add_spawn(), g, item::get_comestible(), item::get_plant_name(), MonsterGroupManager::GetResultFromGroup(), item::is_seed(), m_warning, MonsterGroupResult::name, rng(), and item::tname().
Referenced by grow_plant(), and remove_rotten_items().
| std::vector< tripoint > map::route | ( | const tripoint & | f, |
| const tripoint & | t, | ||
| const pathfinding_settings & | settings, | ||
| const std::set< tripoint > & | pre_closed = {{ }} |
||
| ) | const |
Calculate the best path using A*.
| f | The source location from which to path. |
| t | The destination to which to path. |
| settings | Structure describing pathfinding parameters. |
| pre_closed | Never path through those points. They can still be the source or the destination. |
Definition at line 194 of file pathfinding.cpp.
References pathfinding_settings::allow_climb_stairs, pathfinding_settings::allow_open_doors, ASL_CLOSED, ASL_NONE, pathfinding_settings::avoid_rough_terrain, pathfinding_settings::avoid_sharp, pathfinding_settings::avoid_traps, bash(), bash_rating_internal(), pathfinding_settings::bash_strength, pathfinding_settings::climb_cost, clip_to_bounds(), vehicle::cpart(), debugmsg, detail::digits::done, flat_index(), furniture, maptile::get_furn_t(), get_pathfinding_cache_ref(), maptile::get_ter_t(), maptile::get_trap_t(), has_flag(), has_zlevels(), vehicle_part::hp(), inbounds(), is_disjoint(), is_outside(), line_to(), maptile_at_internal(), pathfinding_settings::max_dist, pathfinding_settings::max_length, move_cost_internal(), vpart_position::obstacle_at_part(), vehicle::part_flag(), PF_CLIMBABLE, PF_SHARP, PF_SLOW, PF_TRAP, PF_UPDOWN, PF_VEHICLE, PF_WALL, cata::hash64_detail::ret, rl_dist(), route(), terrain, TFLAG_GOES_DOWN, TFLAG_GOES_UP, TFLAG_NO_FLOOR, TFLAG_RAMP, TFLAG_RAMP_DOWN, TFLAG_RAMP_UP, valid_move(), veh_at_internal(), VPFLAG_OPENABLE, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by add_item_or_charges(), npc::go_to_omt_destination(), game::handle_action(), game::list_items(), game::look_around(), route(), game::try_get_left_click_action(), and npc::update_path().
| void map::save | ( | ) |
Add currently loaded submaps (in grid) to the mapbuffer.
They will than be stored by that class and can be loaded from that class. This can be called several times, the mapbuffer takes care of adding the same submap several times. It should only be called after the map has been loaded. Submaps that have been loaded from the mapbuffer (and not generated) are already stored in the mapbuffer. TODO: determine if this is really needed? Submaps are already in the mapbuffer if they have been loaded from disc and the are added by map::generate, too. So when do they not appear in the mapbuffer?
Definition at line 6483 of file map.cpp.
References abs_sub, my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, saven(), tripoint::z, and zlevels.
Referenced by start_location::add_map_extra(), add_monsters(), start_location::burn(), talk_function::buy_100_logs(), talk_function::buy_10_logs(), create_lab_consoles(), construct::done_digormine_stair(), construct::done_mine_upstair(), farm_action(), talk_function::field_build_1(), talk_function::field_build_2(), talk_function::field_harvest(), talk_function::field_plant(), defense_game::init_map(), mission_start::kill_horde_master(), talk_function::loot_building(), om_cutdown_trees(), om_harvest_furn(), om_harvest_itm(), om_harvest_ter(), om_set_hide_site(), mission_start::place_deposit_box(), mission_start::place_dog(), mission_start::place_npc_software(), mission_start::place_priest_diary(), basecamp::place_results(), game::place_vehicle_nearby(), mission_start::place_zombie_mom(), start_location::prepare_map(), mission_start::ranch_nurse_1(), mission_start::ranch_nurse_2(), mission_start::ranch_nurse_3(), mission_start::ranch_nurse_4(), mission_start::ranch_nurse_5(), mission_start::ranch_nurse_6(), mission_start::ranch_nurse_7(), mission_start::ranch_nurse_8(), mission_start::ranch_nurse_9(), mission_start::ranch_scavenger_1(), mission_start::ranch_scavenger_2(), mission_start::ranch_scavenger_3(), mission_start::reveal_lab_train_depot(), game::save_maps(), and debug_menu::spawn_nested_mapgen().
|
protected |
Definition at line 6799 of file map.cpp.
References abs_sub, mapbuffer::add_submap(), dbg, Debug, debugmsg, get_nonant(), submap::get_ter(), getsubmap(), grid, submap::last_touched, MAPBUFFER, point_zero, restock_fruits(), season_of_year(), SEEX, SEEY, sm_to_ms_copy(), t_null, calendar::turn, tripoint::xy(), tripoint::z, and zlevels.
Referenced by generate(), and save().
| void map::scent_blockers | ( | std::array< std::array< bool, MAPSIZE_X >, MAPSIZE_Y > & | blocks_scent, |
| std::array< std::array< bool, MAPSIZE_X >, MAPSIZE_Y > & | reduces_scent, | ||
| const point & | min, | ||
| const point & | max | ||
| ) |
Build the map of scent-resistant tiles.
Should be way faster than if done in game.cpp using public map functions.
Definition at line 8362 of file map.cpp.
References abs_sub, inclusive_rectangle< Point, >::contains(), function_over(), vehicle::get_any_parts(), get_vehicles(), ITER_CONTINUE, coords::sm, sm_to_ms_copy(), TFLAG_NO_SCENT, TFLAG_REDUCE_SCENT, VPFLAG_OBSTACLE, VPFLAG_OPENABLE, point::x, tripoint::x, tripoint::xy(), point::y, tripoint::y, and tripoint::z.
Referenced by scent_map::update().
Returns whether F sees T with a view range of range.
Definition at line 6104 of file map.cpp.
References sees().
Referenced by find_clear_path(), get_heat_radiation(), sees(), shake_vehicle(), shoot(), spawn_monsters_submap_group(), and vehicle_selector::vehicle_selector().
|
private |
Don't expose the slope adjust outside map functions.
This one is internal-only, we don't want to expose the slope tweaking ickiness outside the map class.
| F | Thing doing the seeing |
| T | Thing being seen |
| range | Vision range of F |
| bresenham_slope | Indicates the start offset of Bresenham line used to connect the two points, and may subsequently be used to form a path between them. Set to zero if the function returns false. |
Definition at line 6113 of file map.cpp.
References bresenham(), fov_3d, inbounds(), OVERMAP_DEPTH, rl_dist(), skew_vision_cache, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Check if creature can see some items at p.
Includes:
Definition at line 4738 of file map.cpp.
References could_see_items(), has_items(), and Creature::pos().
Referenced by game::butcher(), editmap::draw_main_ui_overlay(), draw_maptile(), npc::find_corpse_to_pulp(), npc::find_item(), game::find_nearby_items(), game::print_items_info(), and npc::see_item_say_smth().
Definition at line 4744 of file map.cpp.
References could_see_items(), and has_items().
Definition at line 1313 of file map.cpp.
References furn_set(), and ter_set().
Referenced by farm_action(), talk_function::field_plant(), and mapgen_function_json_base::formatted_set_incredibly_simple().
|
protected |
Sets abs_sub, see there.
Uses the same coordinate system as abs_sub.
Definition at line 8088 of file map.cpp.
References abs_sub.
Referenced by fake_map::fake_map(), generate(), load(), shift(), and vertical_shift().
| time_duration map::set_field_age | ( | const tripoint & | p, |
| const field_type_id & | type, | ||
| const time_duration & | age, | ||
| bool | isoffset = false |
||
| ) |
Set age of field entry at point.
| p | Location of field |
| type | ID of field |
| age | New age of specified field |
| isoffset | If true, the given age value is added to the existing value, if false, the existing age is ignored and overridden. |
-1_turns if not present (does not create a new field). Definition at line 5321 of file map.cpp.
References get_field(), and type.
Referenced by game::grabbed_furn_move(), mod_field_age(), and game::walk_move().
| int map::set_field_intensity | ( | const tripoint & | p, |
| const field_type_id & | type, | ||
| int | new_intensity, | ||
| bool | isoffset = false |
||
| ) |
Set intensity of field entry at point, creating if not present, removing if intensity becomes 0.
| p | Location of field |
| type | ID of field |
| new_intensity | New intensity of field |
| isoffset | If true, the given new_intensity value is added to the existing value, if false, the existing intensity is ignored and overridden. |
Definition at line 5334 of file map.cpp.
References add_field(), get_field(), field_entry::get_field_intensity(), remove_field(), field_entry::set_field_intensity(), and type.
Referenced by game::grabbed_furn_move(), mod_field_intensity(), and game::walk_move().
|
inline |
Definition at line 436 of file map.h.
References level_cache::floor_cache_dirty, get_cache(), and inbounds_z().
Referenced by furn_set(), loadn(), on_vehicle_moved(), DefaultRemovePartHandler::set_floor_cache_dirty(), and ter_set().
| void map::set_graffiti | ( | const tripoint & | p, |
| const std::string & | contents | ||
| ) |
Definition at line 7664 of file map.cpp.
References get_submap_at(), inbounds(), and submap::set_graffiti().
Referenced by jmapgen_graffiti::apply().
|
inline |
Definition at line 451 of file map.h.
References get_cache(), level_cache::map_memory_seen_cache, MAPSIZE_X, MAPSIZE_Y, tripoint::x, tripoint::y, and tripoint::z.
Referenced by furn_set(), vehicle::stop(), and ter_set().
|
inline |
Definition at line 430 of file map.h.
References get_cache(), inbounds_z(), and level_cache::outside_cache_dirty.
Referenced by draw_fill_background(), furn_set(), loadn(), on_vehicle_moved(), ter_set(), and game::vertical_shift().
| void map::set_pathfinding_cache_dirty | ( | int | zlev | ) |
Definition at line 8579 of file map.cpp.
References pathfinding_cache::dirty, get_pathfinding_cache(), and inbounds_z().
Referenced by add_field(), draw_fill_background(), furn_set(), loadn(), on_vehicle_moved(), remove_field(), and ter_set().
|
inline |
Definition at line 1184 of file map.h.
References abs_sub, set_radiation(), and tripoint::z.
| void map::set_radiation | ( | const tripoint & | p, |
| int | value | ||
| ) |
Definition at line 4023 of file map.cpp.
References get_submap_at(), inbounds(), and submap::set_radiation().
Referenced by jmapgen_setmap::apply(), create_anomaly(), draw_lab(), mapgen_crater(), mapgen_null(), and set_radiation().
|
inline |
Definition at line 423 of file map.h.
References get_cache(), inbounds_z(), and level_cache::seen_cache_dirty.
|
inline |
Definition at line 409 of file map.h.
References level_cache::camera_cache, get_cache(), inbounds(), level_cache::seen_cache, level_cache::seen_cache_dirty, tripoint::x, tripoint::y, and tripoint::z.
Referenced by add_field(), draw_fill_background(), furn_set(), loadn(), trapfunc::map_regen(), vehicle::merge_rackable_vehicle(), vehicle::open_or_close(), process_fields_in_submap(), remove_field(), avatar::set_movement_mode(), DefaultRemovePartHandler::set_transparency_cache_dirty(), vehicle::split_vehicles(), ter_set(), and weather_manager::update_weather().
| void map::set_signage | ( | const tripoint & | p, |
| const std::string & | message | ||
| ) | const |
Definition at line 3988 of file map.cpp.
References get_submap_at(), inbounds(), mapgen_defer::message, and submap::set_signage().
Referenced by jmapgen_sign::apply(), MapExtras::mx_grave(), and MapExtras::mx_minefield().
|
inline |
Definition at line 442 of file map.h.
References get_cache(), inbounds_z(), and level_cache::suspension_cache_dirty.
|
inline |
Definition at line 1201 of file map.h.
References abs_sub, set_temperature(), and tripoint::z.
| void map::set_temperature | ( | const tripoint & | p, |
| int | temperature | ||
| ) |
Definition at line 4057 of file map.cpp.
References get_submap_at(), inbounds(), and submap::set_temperature().
Referenced by draw_lab(), and set_temperature().
|
inline |
Sets a dirty flag on the a given cache.
If this isn't set, it's just assumed that the cache hasn't changed and doesn't need to be updated.
Definition at line 393 of file map.h.
References get_cache(), inbounds_z(), and level_cache::transparency_cache_dirty.
Referenced by add_field(), draw_fill_background(), furn_set(), loadn(), trapfunc::map_regen(), vehicle::merge_rackable_vehicle(), on_vehicle_moved(), vehicle::open_or_close(), process_fields_in_submap(), remove_field(), DefaultRemovePartHandler::set_transparency_cache_dirty(), vehicle::split_vehicles(), ter_set(), weather_manager::update_weather(), and game::vertical_shift().
|
inline |
Definition at line 402 of file map.h.
References get_cache(), inbounds(), MAPSIZE, ms_to_sm_copy(), level_cache::transparency_cache_dirty, tripoint::x, tripoint::y, and tripoint::z.
|
protected |
Set the submap pointer in grid at the give index.
This is the inverse of getsubmap, any existing pointer is overwritten. The index must be valid. The given submap pointer must not be null.
Definition at line 8107 of file map.cpp.
References debugmsg, and grid.
Referenced by copy_grid(), fake_map::fake_map(), generate(), and loadn().
| units::angle map::shake_vehicle | ( | vehicle & | veh, |
| int | velocity_before, | ||
| units::angle | direction | ||
| ) |
Definition at line 1631 of file vehicle_move.cpp.
References _, add_msg(), player::add_msg_player_or_npc(), monster::apply_damage(), debugmsg, Character::dex_cur, monster::disp_name(), g, get_player_character(), vehicle::get_riders(), Character::get_skill_level(), monster::get_weight(), vehicle::global_part_pos3(), Character::hurtall(), m_bad, m_warning, vehicle::name, one_in(), vehicle::part(), vehicle::part_with_feature(), vehicle_part::passenger_flag, vehicle::player_in_control(), Creature::pos(), Creature::posx(), Creature::posy(), Creature::posz(), vehicle_part::remove_flag(), rng(), rng_float(), sees(), skill_driving, Character::str_cur, units::to_kilogram(), unboard_vehicle(), vehicle::velocity, VPFLAG_SEATBELT, tripoint::x, tripoint::y, and tripoint::z.
Referenced by move_vehicle().
| void map::shift | ( | const point & | s | ) |
Shift the map along the vector s.
This is like loading the map with coordinates derived from the current position of the map (abs_sub) plus the shift vector. Note: the map must have been loaded before this can be called.
Definition at line 6652 of file map.cpp.
References clear_vehicle_cache(), clear_vehicle_list(), copy_grid(), debugmsg, g, get_abs_sub(), get_cache(), get_submap_at_grid(), loadn(), MAPSIZE_X, MAPSIZE_Y, my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, point_zero, iuse::remoteveh(), reset_vehicle_cache(), SEEX, SEEY, set_abs_sub(), shift_bitset_cache< MAPSIZE, 1 >(), shift_bitset_cache< MAPSIZE_X, SEEX >(), shift_traps(), shift_tripoint_set(), submaps_with_active_items, support_cache_dirty, update_vehicle_list(), point::x, point::y, and zlevels.
Referenced by shift_traps(), and game::update_map().
|
protected |
| void map::shift_vehicle_z | ( | vehicle & | veh, |
| int | z_shift | ||
| ) |
Definition at line 6606 of file map.cpp.
References debugmsg, vehicle::get_all_parts(), get_cache(), get_submap_at(), vehicle::global_pos3(), invalidate_max_populated_zlev(), submap::is_uniform, avatar_action::move(), vehicle::name, SEEX, SEEY, vehicle::set_submap_moved(), tripoint_above, update_vehicle_list(), level_cache::vehicle_list, submap::vehicles, tripoint::x, tripoint::y, tripoint::z, and level_cache::zone_vehicles.
Referenced by vehicle::shift_zlevel().
| void map::shoot | ( | const tripoint & | p, |
| projectile & | proj, | ||
| bool | hit_items | ||
| ) |
Definition at line 3702 of file map.cpp.
References _, add_field(), add_msg(), sounds::alarm, ammo_effect_INCENDIARY, ammo_effect_LASER, ammo_effect_LIGHTNING, ammo_effect_PLASMA, damage_unit::amount, bash(), bash_ter_success(), ranged_bash_info::block_unaimed_chance, detail::check(), damage_unit::damage_multiplier, damage_instance::damage_units, ranged_bash_info::destroy_threshold, DT_HEAT, DT_STAB, fd_fire, fd_web, ranged_bash_info::flammable, g, projectile::get_ammo_effects(), get_avatar(), get_field(), field_entry::get_field_intensity(), getabs(), projectile::has_effect(), has_flag(), projectile::impact, impassable(), inbounds(), is_transparent(), ms_to_sm_copy(), damage_instance::mult_damage(), one_in(), ranged_bash_info::reduction, ranged_bash_info::reduction_laser, remove_field(), damage_unit::res_pen, rng(), sees(), smash_items(), sounds::sound(), ter(), tername(), terrain, TIMED_EVENT_WANTED, ammo_effect::trail_chance, ammo_effect::trail_field_type, ammo_effect::trail_intensity_max, ammo_effect::trail_intensity_min, calendar::turn, damage_instance::type_damage(), veh_at(), and x_in_y().
Referenced by ranged::execute_shaped_attack().
| void map::smash_items | ( | const tripoint & | p, |
| int | power, | ||
| const std::string & | cause_message, | ||
| bool | do_destroy | ||
| ) |
Tries to smash the items at the given tripoint.
Definition at line 2976 of file map.cpp.
References _, add_item_or_charges(), add_msg(), add_splash(), item_contents::all_items_top(), item_stack::begin(), item::contents, item_stack::end(), fd_null, g, has_items(), i_at(), i_rem(), m_bad, rng_float(), and x_in_y().
Referenced by explosion_handler::do_blast_new(), move_vehicle(), and shoot().
Definition at line 1280 of file map.h.
References abs_sub, spawn_an_item(), and tripoint::z.
Definition at line 4122 of file map.cpp.
References add_item_or_charges(), item::charges, has_flag(), item::in_its_container(), LIQUID, item::made_of(), null_item_reference(), and item::set_damage().
Referenced by salvage_actor::cut_up(), spawn_an_item(), and spawn_item().
| void map::spawn_artifact | ( | const tripoint & | p | ) |
Definition at line 4161 of file map.cpp.
References add_item_or_charges(), new_artifact(), and calendar::start_of_cataclysm.
Referenced by draw_mine(), and draw_temple().
|
inline |
|
inline |
| void map::spawn_item | ( | const tripoint & | p, |
| const itype_id & | type_id, | ||
| unsigned | quantity = 1, |
||
| int | charges = 0, |
||
| const time_point & | birthday = calendar::start_of_cataclysm, |
||
| int | damlevel = 0 |
||
| ) |
Definition at line 4171 of file map.cpp.
References item::has_flag(), string_id< T >::is_null(), item_is_blacklisted(), one_in(), item::set_flag(), spawn_an_item(), and spawn_item().
Referenced by jmapgen_spawn_item::apply(), MapExtras::burned_ground_parser(), talk_function::buy_100_logs(), talk_function::buy_10_logs(), create_anomaly(), create_burnproducts(), MapExtras::dead_vegetation_parser(), game::disable_robot(), draw_lab(), draw_office_tower(), explosion_handler::emp_blast(), vehicle::handle_trap(), make_rubble(), mapgen_cavern(), mapgen_tutorial(), MapExtras::mx_casings(), MapExtras::mx_drugdeal(), MapExtras::mx_grave(), MapExtras::mx_mayhem(), MapExtras::mx_minefield(), MapExtras::mx_roadworks(), om_cutdown_trees(), trap::on_disarmed(), mission_start::place_deposit_box(), MapExtras::place_fumarole(), mission_start::place_priest_diary(), place_vending(), mission_start::ranch_nurse_1(), mission_start::ranch_nurse_2(), mission_start::ranch_scavenger_1(), mission_start::ranch_scavenger_2(), mission_start::ranch_scavenger_3(), spawn_item(), and game::vertical_move().
|
inline |
Definition at line 1356 of file map.h.
References abs_sub, spawn_items(), and tripoint::z.
| std::vector< item * > map::spawn_items | ( | const tripoint & | p, |
| const std::vector< item > & | new_items | ||
| ) |
Definition at line 4140 of file map.cpp.
References add_item_or_charges(), has_flag(), inbounds(), item::is_null(), LIQUID, and cata::hash64_detail::ret.
Referenced by jmapgen_loot::apply(), bash_furn_success(), bash_items(), bash_ter_success(), complete_construction(), talk_function::loot_building(), MapExtras::mx_casings(), MapExtras::mx_corpses(), process_fields_in_submap(), put_items_from_loc(), veh_utils::repair_part(), smash(), and spawn_items().
| void map::spawn_monsters | ( | bool | ignore_sight | ) |
Spawn monsters from submap spawn points and from the overmap.
| ignore_sight | If true, monsters may spawn in the view of the player character (useful when the whole map has been loaded instead, e.g. when starting a new game, or after teleportation or after moving vertically). If false, monsters are not spawned in view of player character. |
Definition at line 7567 of file map.cpp.
References abs_sub, my_MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, spawn_monsters_submap(), tripoint::x, tripoint::y, tripoint::z, and zlevels.
Referenced by game::do_turn(), game::place_player_overmap(), game::start_game(), game::update_map(), and game::vertical_shift().
|
private |
Definition at line 7512 of file map.cpp.
References abs_sub, monster::can_move_to(), center, monster::friendly, g, get_map(), get_submap_at_grid(), overmapbuffer::groups_at(), monster::mission_id, monster::on_load(), overmap_buffer, points_in_radius(), random_point(), sm_to_ms_copy(), overmapbuffer::spawn_monster(), spawn_monsters_submap_group(), submap::spawns, monster::unique_name, and tripoint::xy().
Referenced by spawn_monsters().
|
private |
Definition at line 7378 of file map.cpp.
References abs_sub, add_msg(), dbg, g, get_submap_at_grid(), getabs(), MonsterGroupManager::GetResultFromGroup(), HALF_MAPSIZE_X, has_flag_ter_or_furn(), has_floor(), submap::is_uniform, anonymous_namespace{overmap_location.cpp}::locations, m_debug, MAPSIZE, MHA_ALWAYS, MonsterGroupResult::name, monster::on_load(), MonsterGroupResult::pack_size, passable(), random_entry_removed(), rl_dist(), rng(), sees(), SEEX, SEEY, monster::set_horde_attraction(), sm_to_ms(), TFLAG_INDOORS, Warn, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by spawn_monsters_submap().
| void map::spawn_natural_artifact | ( | const tripoint & | p, |
| artifact_natural_property | prop | ||
| ) |
Definition at line 4166 of file map.cpp.
References add_item_or_charges(), new_natural_artifact(), and calendar::start_of_cataclysm.
Referenced by debug_menu::debug(), and MapExtras::mx_portal_in().
|
private |
Definition at line 249 of file map_field.cpp.
References scent_block::apply_gas(), detail::count(), g, gas_can_spread_to(), gas_spread_to(), field_entry::get_field_age(), field_entry::get_field_intensity(), field_entry::get_field_type(), field_type::get_intensity_level(), get_local_windpower(), get_map(), get_neighbors(), get_weather(), get_wind_blockers(), getabs(), is_outside(), maptile_at_internal(), ms_to_omt_copy(), one_in(), overmap_buffer, OVERMAP_DEPTH, OVERMAP_HEIGHT, points_in_radius(), maptile::pos_, random_entry(), rng(), field_intensity_level::scent_neutralization, field_entry::set_field_age(), overmapbuffer::ter(), valid_move(), point::x, x_in_y(), tripoint::xy(), point::y, tripoint::z, and zlevels.
Referenced by process_fields_in_submap().
| units::volume map::stored_volume | ( | const tripoint & | p | ) |
Definition at line 4201 of file map.cpp.
References i_at(), and item_stack::stored_volume().
|
private |
Definition at line 2261 of file map.cpp.
References support_cache_dirty, and zlevels.
Referenced by add_field(), add_item_or_charges(), drop_furniture(), furn_set(), ter_set(), and update_suspension_cache().
| bool map::supports_above | ( | const tripoint & | p | ) | const |
Does this tile support vehicles and furniture above it.
Definition at line 2014 of file map.cpp.
References f_null, maptile::get_furn(), maptile::get_ter_t(), cata::optional< T >::has_value(), maptile_at(), map_data_common_t::movecost, int_id< T >::obj(), ter(), and veh_at().
Referenced by vehicle::check_falling_or_floating(), and drop_furniture().
Definition at line 1492 of file map.cpp.
References get_submap_at(), submap::get_ter(), inbounds(), and t_null.
Referenced by computer_session::action_srcf_elevator(), actualize(), ter_furn_transform::add_all_messages(), add_boardable(), cata_event_dispatch::avatar_moves(), bash_rating(), bash_resistance(), bash_strength(), bash_ter_furn(), bash_ter_success(), board_up(), MapExtras::burned_ground_parser(), can_examine_at(), vehicle::autodrive_controller::check_drivable(), close_door(), complete_construction(), coverage(), iexamine::curtains(), MapExtras::dead_vegetation_parser(), determine_wall_corner(), displace_water(), construct::done_digormine_stair(), construct::done_mine_upstair(), draw_connections(), draw_lab(), editmap::draw_main_ui_overlay(), draw_mine(), draw_temple(), draw_triffid(), explosion_handler::emp_blast(), examine(), game::examine(), game::extended_description(), talk_function::field_plant(), game::find_or_make_stairs(), find_potential_computer_point(), gas_can_spread_to(), get_changed_ids_from_update(), get_harvest(), get_harvest_names(), get_known_connections(), get_roof(), get_ter_transforms_into(), has_flag_ter(), has_neighbor(), hit_with_acid(), is_bashable(), is_bashable_ter(), is_suspension_valid(), talk_function::loot_building(), mapgen_ants_generic(), mapgen_lake_shore(), fungal_effects::marlossify(), map_stack::max_volume(), avatar_action::move(), move_cost(), move_vehicle(), MapExtras::mx_grove(), MapExtras::mx_helicopter(), MapExtras::mx_house_spider(), MapExtras::mx_house_wasp(), MapExtras::mx_portal_in(), MapExtras::mx_shrubbery(), obstacle_coverage(), om_cutdown_trees(), om_harvest_ter(), open(), open_door(), iexamine::pedestal_wyrm(), activity_handlers::pickaxe_finish(), mission_start::place_deposit_box(), place_items(), game::place_player(), game::print_fields_info(), game::print_graffiti_info(), game::print_terrain_info(), process_fields_in_submap(), process_items_in_submap(), produce_sap(), rad_scorch(), resolve_regional_terrain_and_furniture(), restock_fruits(), mission_start::reveal_lab_train_depot(), shoot(), supports_above(), ter(), tername(), ter_furn_transform::transform(), translate(), translate_radius(), trap_set(), Character::update_bodytemp(), update_suspension_cache(), vehicle_wheel_traction(), game::vertical_move(), game::walk_move(), and water_from().
Definition at line 1633 of file map.cpp.
References detail::find(), get_cache(), get_submap_at(), submap::get_ter(), getabs(), map_data_common_t::has_flag(), inbounds(), invalidate_max_populated_zlev(), int_id< T >::obj(), set_floor_cache_dirty(), set_memory_seen_cache_dirty(), set_outside_cache_dirty(), set_pathfinding_cache_dirty(), set_seen_cache_dirty(), set_suspension_cache_dirty(), submap::set_ter(), set_transparency_cache_dirty(), support_cache_dirty, support_dirty(), level_cache::suspension_cache, TFLAG_INDOORS, TFLAG_NO_FLOOR, TFLAG_SUSPENDED, int_id< T >::to_i(), tr_ledge, tr_null, map_data_common_t::transparent, ter_t::trap, traplocs, tripoint::xy(), and tripoint::z.
Referenced by computer_session::action_srcf_elevator(), add_computer(), jmapgen_terrain::apply(), jmapgen_computer::apply(), jmapgen_setmap::apply(), bash_ter_success(), board_up(), MapExtras::burned_ground_parser(), close_door(), collapse_at(), collapse_invalid_suspension(), complete_construction(), iexamine::curtains(), MapExtras::dead_vegetation_parser(), displace_water(), construct::done_digormine_stair(), construct::done_mine_upstair(), construct::done_ramp_high(), construct::done_ramp_low(), draw_anthill(), draw_circle_ter(), draw_connections(), draw_lab(), draw_line_ter(), draw_mine(), draw_rough_circle_ter(), draw_slimepit(), draw_square_ter(), draw_temple(), draw_triffid(), explosion_handler::emp_blast(), farm_action(), talk_function::field_harvest(), game::forced_door_closing(), mapgen_function_json_base::formatted_set_incredibly_simple(), mapf::formatted_set_simple(), hit_with_acid(), talk_function::loot_building(), make_rubble(), mapgen_ants_curved(), mapgen_ants_four_way(), mapgen_ants_generic(), mapgen_ants_straight(), mapgen_ants_tee(), mapgen_cavern(), mapgen_crater(), mapgen_field(), mapgen_forest_trail_curved(), mapgen_forest_trail_four_way(), mapgen_forest_trail_straight(), mapgen_forest_trail_tee(), mapgen_hellmouth(), mapgen_highway(), mapgen_hive(), mapgen_lake_shore(), mapgen_null(), mapgen_parking_lot(), mapgen_rift(), mapgen_river_curved(), mapgen_river_curved_not(), mapgen_river_straight(), mapgen_road(), mapgen_rock_partial(), mapgen_sewer_curved(), mapgen_sewer_four_way(), mapgen_sewer_straight(), mapgen_sewer_tee(), mapgen_tutorial(), fungal_effects::marlossify(), move_vehicle(), MapExtras::mx_bandits_block(), MapExtras::mx_clay_deposit(), MapExtras::mx_clearcut(), MapExtras::mx_grave(), MapExtras::mx_grove(), MapExtras::mx_helicopter(), MapExtras::mx_house_wasp(), MapExtras::mx_pond(), MapExtras::mx_portal_in(), MapExtras::mx_roadblock(), MapExtras::mx_shrubbery(), MapExtras::mx_spider(), om_cutdown_trees(), om_harvest_ter(), om_set_hide_site(), open_door(), iexamine::pedestal_wyrm(), MapExtras::place_fumarole(), place_gas_pump(), mission_start::place_npc_software(), process_fields_in_submap(), rad_scorch(), mission_start::ranch_nurse_4(), mission_start::ranch_nurse_5(), mission_start::ranch_scavenger_2(), mission_start::ranch_scavenger_3(), resolve_regional_terrain_and_furniture(), restock_fruits(), science_room(), set(), fungal_effects::spread_fungus_one_tile(), ter_or_furn_set(), ter_set(), ter_furn_transform::transform(), translate(), translate_radius(), and game::vertical_move().
|
inline |
| std::string map::tername | ( | const tripoint & | p | ) | const |
Definition at line 1703 of file map.cpp.
References map_data_common_t::name(), int_id< T >::obj(), and ter().
Referenced by iexamine::elevator(), game::grabbed_furn_move(), game::monmove(), npc::move_to(), name(), game::place_player(), game::print_terrain_info(), shoot(), smash(), avatar_action::swim(), tername(), game::update_stair_monsters(), and game::vertical_move().
| bool map::tinder_at | ( | const tripoint & | p | ) |
Definition at line 5119 of file map.cpp.
References get_submap_at(), submap::get_ter(), submap::get_trap(), inbounds(), int_id< T >::obj(), tr_null, and ter_t::trap.
Referenced by can_see_trap_at(), complete_construction(), creature_on_trap(), disarm_trap(), draw_lab(), editmap::draw_main_ui_overlay(), game::examine(), fill_funnels(), game::fling_creature(), game::get_dangerous_tile(), game::grabbed_furn_move(), vehicle::handle_trap(), place_trap_actor::is_allowed(), trapfunc::map_regen(), MapExtras::mx_minefield(), MapExtras::mx_portal(), place_and_add_as_known(), game::print_trap_info(), game::process_artifact(), game::prompt_dangerous_tile(), and valid_move().
Definition at line 3910 of file map.cpp.
References debugmsg, map_data_common_t::name(), int_id< T >::obj(), points_on_zlevel(), ter(), and ter_set().
Referenced by jmapgen_translate::apply(), mapgen_lake_shore(), start_location::prepare_map(), mission_start::ranch_nurse_5(), mission_start::ranch_nurse_6(), mission_start::ranch_nurse_7(), mission_start::ranch_nurse_8(), and mission_start::ranch_scavenger_3().
| void map::translate_radius | ( | const ter_id & | from, |
| const ter_id & | to, | ||
| float | radi, | ||
| const tripoint & | p, | ||
| bool | same_submap = false, |
||
| bool | toggle_between = false |
||
| ) |
Definition at line 3926 of file map.cpp.
References debugmsg, getabs(), ms_to_omt_copy(), map_data_common_t::name(), int_id< T >::obj(), points_on_zlevel(), ter(), ter_set(), and trig_dist().
Definition at line 5171 of file map.cpp.
References debugmsg, get_submap_at(), submap::get_ter(), submap::get_trap(), inbounds(), int_id< T >::obj(), remove_trap(), submap::set_trap(), ter(), tr_null, traplocs, and type.
Referenced by jmapgen_trap::apply(), draw_lab(), vehicle::handle_trap(), mtrap_set(), MapExtras::mx_portal(), and place_and_add_as_known().
| void map::unboard_vehicle | ( | const tripoint & | p, |
| bool | dead_passenger = false |
||
| ) |
Definition at line 1095 of file map.cpp.
References Character::controlling_vehicle, debugmsg, g, Character::in_vehicle, optional_vpart_position::part_with_feature(), unboard_vehicle(), veh_at(), and VPFLAG_BOARDABLE.
| void map::unboard_vehicle | ( | const vpart_reference & | vp, |
| Character * | passenger, | ||
| bool | dead_passenger = false |
||
| ) |
Definition at line 1075 of file map.cpp.
References Character::controlling_vehicle, debugmsg, Character::in_vehicle, vehicle::invalidate_mass(), vpart_reference::part(), vehicle_part::passenger_flag, vehicle_part::remove_flag(), vehicle::skidding, and vpart_reference::vehicle().
Referenced by board_vehicle(), detach_vehicle(), game::fling_creature(), game::is_game_over(), npc::move_to(), game::moving_vehicle_dismount(), game::phasing_move(), game::place_player(), game::place_player_overmap(), shake_vehicle(), avatar_action::swim(), and unboard_vehicle().
| void map::update_lum | ( | item_location & | loc, |
| bool | add | ||
| ) |
Update luminosity before and after item's transformation.
Definition at line 4424 of file map.cpp.
References om_direction::add(), item_location::get_item(), get_submap_at(), item::is_emissive(), item_location::position(), submap::update_lum_add(), and submap::update_lum_rem().
| void map::update_pathfinding_cache | ( | int | zlev | ) | const |
Definition at line 8600 of file map.cpp.
References furniture, maptile::get_field(), field_entry::get_field_intensity(), field_entry::get_field_type(), maptile::get_furn_t(), get_pathfinding_cache(), get_submap_at_grid(), maptile::get_ter_t(), maptile::get_trap_t(), trap::is_benign(), MAPSIZE_X, MAPSIZE_Y, move_cost_internal(), my_MAPSIZE, PF_CLIMBABLE, PF_FIELD, PF_NORMAL, PF_SHARP, PF_SLOW, PF_TRAP, PF_UPDOWN, PF_VEHICLE, PF_WALL, SEEX, SEEY, sx, sy, terrain, TFLAG_CLIMBABLE, TFLAG_GOES_DOWN, TFLAG_GOES_UP, TFLAG_RAMP, TFLAG_RAMP_DOWN, TFLAG_RAMP_UP, TFLAG_SHARP, type, veh_at_internal(), tripoint::x, and tripoint::y.
Referenced by get_pathfinding_cache_ref().
| void map::update_submap_active_item_status | ( | const tripoint & | p | ) |
Definition at line 5569 of file map.cpp.
References abs_sub, submap::active_items, active_item_cache::empty(), get_submap_at(), SEEX, SEEY, submaps_with_active_items, tripoint::x, tripoint::y, and tripoint::z.
| void map::update_suspension_cache | ( | const int & | z | ) |
Definition at line 7919 of file map.cpp.
References debugmsg, get_cache(), get_submap_at(), get_submap_at_grid(), submap::get_ter(), getabs(), getlocal(), inbounds(), is_suspension_valid(), my_MAPSIZE, int_id< T >::obj(), coords::project_combine(), SEEX, SEEY, support_dirty(), level_cache::suspension_cache, level_cache::suspension_cache_dirty, level_cache::suspension_cache_initialized, sx, sy, ter(), terrain, TFLAG_SUSPENDED, point::x, and point::y.
Referenced by build_map_cache().
| void map::update_vehicle_cache | ( | vehicle * | , |
| int | old_zlevel | ||
| ) |
| void map::update_vehicle_list | ( | const submap * | to, |
| int | zlev | ||
| ) |
Definition at line 335 of file map.cpp.
References get_cache(), last_full_vehicle_list_dirty, level_cache::vehicle_list, submap::vehicles, and level_cache::zone_vehicles.
Referenced by displace_vehicle(), rotate(), shift(), and shift_vehicle_z().
| void map::update_visibility_cache | ( | int | zlev | ) |
Definition at line 5578 of file map.cpp.
References abs_sub, apparent_light_at(), BRIGHT, effect_boomered, g, visibility_variables::g_light_level, get_cache(), get_cache_ref(), LIT, level_cache::lm, MAPSIZE, MAPSIZE_X, MAPSIZE_Y, four_quadrants::max(), my_MAPSIZE, overmap_buffer, SEEX, SEEY, overmapbuffer::set_seen(), coords::sm, sm_to_omt_copy(), visibility_variables::u_clairvoyance, visibility_variables::u_is_boomered, visibility_variables::u_sight_impaired, visibility_variables::variables_set, level_cache::visibility_cache, visibility_variables_cache, visibility_variables::vision_threshold, tripoint::x, tripoint::y, and tripoint::z.
Referenced by game::draw(), draw(), game::get_player_input(), and game::look_around().
| std::list< item > map::use_amount | ( | const tripoint & | origin, |
| int | range, | ||
| const itype_id & | type, | ||
| int & | quantity, | ||
| const std::function< bool(const item &)> & | filter = return_true<item> |
||
| ) |
Definition at line 4822 of file map.cpp.
References points_in_radius(), cata::hash64_detail::ret, rl_dist(), type, and use_amount_square().
| std::list< item > map::use_amount_square | ( | const tripoint & | p, |
| const itype_id & | type, | ||
| int & | quantity, | ||
| const std::function< bool(const item &)> & | filter = return_true<item> |
||
| ) |
Definition at line 4800 of file map.cpp.
References i_at(), cata::hash64_detail::ret, type, item::typeId(), use_amount_stack(), veh_at(), and water_from().
Referenced by use_amount().
| std::list< item > map::use_charges | ( | const tripoint & | origin, |
| int | range, | ||
| const itype_id & | type, | ||
| int & | quantity, | ||
| const std::function< bool(const item &)> & | filter = return_true<item>, |
||
| basecamp * | bcp = nullptr |
||
| ) |
Definition at line 4918 of file map.cpp.
References accessible_items(), item::charges, furn(), has_furn(), i_at(), itype_battery, itype_chemistry_set, itype_dehydrator, itype_electrolysis_kit, itype_food_processor, itype_forge, itype_hotplate, itype_kiln, itype_press, itype_soldering_iron, itype_vac_sealer, itype_welder, string_id< itype >::NULL_ID(), optional_vpart_position::part_with_feature(), reachable_flood_steps(), cata::hash64_detail::ret, calendar::start_of_cataclysm, type, item::typeId(), basecamp::use_charges(), use_charges_from_furn(), use_charges_from_stack(), veh_at(), and water_from().
Referenced by basecamp_action_components::consume_components(), player::consume_items(), player::consume_tools(), and iexamine::use_furn_fake_item().
| bool map::valid_move | ( | const tripoint & | from, |
| const tripoint & | to, | ||
| bool | bash = false, |
||
| bool | flying = false, |
||
| bool | via_ramp = false |
||
| ) | const |
Returns true if a creature could walk from from to to in one step.
That is, if the tiles are adjacent and either on the same z-level or connected by stairs or (in case of flying monsters) open air with no floors.
Definition at line 1855 of file map.cpp.
References bash(), map_data_common_t::has_flag(), ter_t::id, inbounds(), string_id< T >::is_null(), trap::loadid, maptile_at(), midpoint(), map_data_common_t::movecost, passable(), vehicle::roof_at_part(), TFLAG_GOES_DOWN, TFLAG_GOES_UP, TFLAG_NO_FLOOR, TFLAG_RAMP, tr_at(), tr_ledge, valid_move(), veh_at_internal(), tripoint::x, tripoint::xy(), tripoint::y, tripoint::z, and zlevels.
Referenced by combined_movecost(), draw_critter_internal(), has_floor_or_support(), scent_map::inbounds(), monster::move(), process_fields_in_submap(), route(), spread_gas(), monster::stumble(), and valid_move().
| optional_vpart_position map::veh_at | ( | const tripoint & | p | ) | const |
Checks if tile is occupied by vehicle and by which part.
| p | Tile to check for vehicle |
Definition at line 1003 of file map.cpp.
References get_cache(), inbounds(), cata::nullopt, veh_at_internal(), level_cache::veh_in_active_range, and tripoint::z.
Referenced by add_splatter(), add_vehicle_to_map(), apply_faction_ownership(), bash(), bash_rating(), bash_vehicle(), board_vehicle(), build_seen_cache(), VehicleSpawnFunction::builtin_parkinglot(), can_examine_at(), can_put_items(), can_use_bipod(), vehicle::autodrive_controller::check_drivable(), vehicle::check_heli_ascend(), vehicle::check_heli_descend(), climb_difficulty(), doors::close_door(), veh_interact::complete_vehicle(), game::control_vehicle(), coverage(), creature_in_field(), crush(), debug_menu::debug(), deregister_vehicle_zone(), activity_handlers::repair_activity_hack::anonymous_namespace{activity_handlers.cpp}::discharge_real_power_source(), game::do_turn(), editmap::draw_main_ui_overlay(), drop_vehicle(), game::examine(), npc::execute_action(), ranged::expected_coverage(), npc::find_item(), game::fling_creature(), game::forced_door_closing(), inventory::form_from_map(), game::get_dangerous_tile(), activity_handlers::repair_activity_hack::anonymous_namespace{activity_handlers.cpp}::get_fake_tool(), overmap_ui::get_overmap_path_to(), game::get_veh_dir_indicator_location(), grab(), game::grabbed_furn_move(), game::grabbed_veh_move(), ranged::gunmode_checks_common(), ranged::gunmode_checks_weapon(), handbrake(), game::handle_action(), has_nearby_chair(), has_nearby_table(), jmapgen_setmap::has_vehicle_collision(), mapgen_function_json_base::has_vehicle_collision(), jmapgen_alternativly< PieceType >::has_vehicle_collision(), jmapgen_sign::has_vehicle_collision(), jmapgen_vending_machine::has_vehicle_collision(), jmapgen_toilet::has_vehicle_collision(), jmapgen_gaspump::has_vehicle_collision(), jmapgen_vehicle::has_vehicle_collision(), jmapgen_trap::has_vehicle_collision(), jmapgen_furniture::has_vehicle_collision(), jmapgen_terrain::has_vehicle_collision(), jmapgen_computer::has_vehicle_collision(), jmapgen_sealed_item::has_vehicle_collision(), haul(), is_bashable(), weather::is_sheltered(), game::load(), mine_activity(), monster_in_field(), mop_spills(), avatar_action::move(), move_cost(), npc::move_to(), move_vehicle(), game::moving_vehicle_dismount(), MapExtras::mx_helicopter(), obstacle_coverage(), obstacle_name(), open(), open_door(), vehicle::part_collision(), game::phasing_move(), npc::pick_up_item(), game::place_player(), player_in_field(), game::print_all_tile_info(), game::remoteveh(), DefaultRemovePartHandler::removed(), shoot(), spell_effect::spawn_summoned_vehicle(), autodrive_activity_actor::start(), supports_above(), avatar_action::swim(), unboard_vehicle(), Character::update_bodytemp(), deploy_furn_actor::use(), deploy_tent_actor::use(), use_amount_square(), use_charges(), game::validate_linked_vehicles(), vehicle_selector::vehicle_selector(), and game::walk_move().
Definition at line 1038 of file map.cpp.
References veh_at_internal().
Referenced by draw_from_above(), draw_maptile(), process_fields_in_submap(), route(), update_pathfinding_cache(), valid_move(), veh_at(), and veh_at_internal().
Definition at line 1018 of file map.cpp.
References debugmsg, get_cache(), level_cache::veh_cached_parts, level_cache::veh_exists_at, level_cache::veh_in_active_range, tripoint::x, tripoint::y, and tripoint::z.
| float map::vehicle_vehicle_collision | ( | vehicle & | veh, |
| vehicle & | veh2, | ||
| const std::vector< veh_collision > & | collisions | ||
| ) |
Definition at line 756 of file map.cpp.
References _, add_msg(), rl_vec2d::as_point(), c, vehicle::damage(), vehicle::damage_all(), debugmsg, rl_vec2d::dot_product(), DT_BASH, vehicle::face_vec(), get_collision_factor(), vehicle::global_pos3(), tileray::init(), m_bad, M_PI, rl_vec2d::magnitude(), vehicle_part::mount, vehicle::move, vpart_info::name(), vehicle::name, rl_vec2d::normalized(), vehicle::of_turn, vehicle::part(), vehicle::part_info(), vehicle::part_with_feature(), rl_vec2d::rotated(), vehicle::rotated_center_of_mass(), vehicle::skidding, vehicle::sm_pos, units::to_kilogram(), vehicle::total_mass(), vehicle::velo_vec(), vehicle::velocity, vehicle::vertical_velocity, VPFLAG_ARMOR, point::x, tripoint::x, rl_vec2d::x, point::y, tripoint::y, rl_vec2d::y, and tripoint::z.
Referenced by move_vehicle().
| float map::vehicle_wheel_traction | ( | const vehicle & | veh, |
| bool | ignore_movement_modifiers = false |
||
| ) | const |
Definition at line 1567 of file vehicle_move.cpp.
References vehicle::can_float(), vehicle::cpart(), vehicle::global_part_pos3(), vehicle::is_in_water(), vehicle_movement::is_on_rails(), vehicle::is_watercraft(), move_cost_ter_furn(), int_id< T >::obj(), vehicle::part_info(), vehicle::rail_wheelcache, ter(), TFLAG_DEEP_WATER, TFLAG_NO_FLOOR, vehicle_part::wheel_area(), vpart_info::wheel_terrain_mod(), and vehicle::wheelcache.
Referenced by vehicle::act_on_map(), and move_vehicle().
| void map::vehmove | ( | ) |
Definition at line 409 of file map.cpp.
References abs_sub, detail::count(), dirty_vehicle_list, vehicle::enumerate_vehicles(), vehicle::gain_moves(), get_cache(), OVERMAP_DEPTH, OVERMAP_HEIGHT, vehicle::slow_leak(), wrapped_vehicle::v, level_cache::vehicle_list, vehproceed(), tripoint::z, and zlevels.
Referenced by game::do_turn().
| bool map::vehproceed | ( | VehicleList & | vehicle_list | ) |
Definition at line 457 of file map.cpp.
References abs_sub, vehicle::act_on_map(), get_cache(), get_vehicles(), vehicle::of_turn, OVERMAP_DEPTH, OVERMAP_HEIGHT, wrapped_vehicle::v, level_cache::veh_exists_at, level_cache::veh_in_active_range, tripoint::z, and zlevels.
Referenced by vehmove().
| void map::vertical_shift | ( | int | newz | ) |
Moves the map vertically to (not by!) newz.
Does not actually shift anything, only forces cache updates. In the future, it will either actually shift the map or it will get removed after 3D migration is complete.
Definition at line 6771 of file map.cpp.
References debugmsg, get_abs_sub(), OVERMAP_DEPTH, OVERMAP_HEIGHT, set_abs_sub(), tripoint::xy(), and zlevels.
Referenced by game::vertical_shift().
Definition at line 4363 of file map.cpp.
References examine(), map_data_common_t::examine, furn(), map_data_common_t::has_flag(), has_flag(), item::INFINITE_CHARGES, int_id< T >::obj(), one_in(), cata::hash64_detail::ret, rng(), calendar::start_of_cataclysm, t_sewage, ter(), TFLAG_CURRENT, TFLAG_DEEP_WATER, and iexamine::water_source().
Referenced by inventory::form_from_map(), use_amount_square(), and use_charges().
|
friend |
|
protected |
Absolute coordinates of first submap (get_submap_at(0,0)) This is in submap coordinates (see overmapbuffer for explanation).
It is set upon:
Definition at line 1805 of file map.h.
Referenced by add_item(), add_item_or_charges(), add_vehicle(), adjust_radiation(), apply_faction_ownership(), bash_rating(), bash_resistance(), bash_strength(), build_floor_caches(), can_put_items(), can_put_items_ter_furn(), check_submap_active_item_consistency(), clear_vehicle_cache(), create_anomaly(), decay_fields_and_scent(), detach_vehicle(), draw_fill_background(), draw_lab(), draw_mine(), draw_temple(), draw_triffid(), features(), furn(), furn_set(), furnname(), generate(), get_abs_sub(), get_active_items_in_radius(), get_nonant(), get_submap_at(), get_vehicles(), getabs(), getlocal(), has_flag(), has_flag_furn(), has_flag_ter(), has_flag_ter_or_furn(), has_furn(), i_at(), i_clear(), i_rem(), is_bashable(), is_bashable_furn(), is_bashable_ter(), is_bashable_ter_furn(), is_divable(), is_outside(), is_water_shallow_current(), loadn(), make_active(), move_cost(), move_cost_ter_furn(), name(), passable(), place_items(), place_npc(), place_vending(), points_on_zlevel(), process_fields(), process_fields_in_submap(), process_items(), reset_vehicle_cache(), rotate(), save(), saven(), scent_blockers(), set_abs_sub(), set_radiation(), set_temperature(), spawn_an_item(), spawn_item(), spawn_items(), spawn_monsters(), spawn_monsters_submap(), spawn_monsters_submap_group(), ter(), ter_set(), tername(), update_submap_active_item_status(), update_visibility_cache(), vehmove(), and vehproceed().
|
private |
Holds caches for visibility, light, transparency and vehicles.
Definition at line 1977 of file map.h.
Referenced by access_cache(), get_cache(), get_cache_ref(), and map().
| std::set<vehicle *> map::dirty_vehicle_list |
Definition at line 1618 of file map.h.
Referenced by detach_vehicle(), loadn(), vehicle::merge_rackable_vehicle(), DefaultRemovePartHandler::removed(), MapgenRemovePartHandler::removed(), vehicle::split_vehicles(), and vehmove().
|
private |
Vector of tripoints containing active field-emitting furniture.
Definition at line 1973 of file map.h.
Referenced by actualize(), furn_set(), get_furn_field_locations(), load(), and shift_traps().
|
private |
The list of currently loaded submaps.
The size of this should not be changed. After calling load or generate, it should only contain non-null pointers. Use getsubmap or setsubmap to access it.
Definition at line 1962 of file map.h.
Referenced by actualize(), add_roofs(), clear_spawns(), clear_traps(), editmap::cleartmpmap(), displace_vehicle(), getsubmap(), loadn(), map(), saven(), and setsubmap().
|
private |
Vehicle list doesn't change often, but is pretty expensive.
Definition at line 1993 of file map.h.
Referenced by get_vehicles().
|
private |
Definition at line 1994 of file map.h.
Referenced by add_vehicle_to_cache(), clear_vehicle_list(), get_vehicles(), reset_vehicle_cache(), and update_vehicle_list().
|
private |
Definition at line 2007 of file map.h.
Referenced by calc_max_populated_zlev(), and invalidate_max_populated_zlev().
|
protected |
Definition at line 1794 of file map.h.
Referenced by add_spawn(), build_floor_cache(), build_obstacle_cache(), build_outside_cache(), build_transparency_cache(), calc_max_populated_zlev(), clip_to_bounds(), decay_fields_and_scent(), draw_fill_background(), fake_map::fake_map(), function_over(), generate(), generate_lightmap(), get_active_items_in_radius(), get_neighbors(), get_nonant(), get_vehicles(), getmapsize(), load(), map(), points_in_radius(), points_in_rectangle(), points_on_zlevel(), process_fields(), save(), shift(), spawn_monsters(), update_pathfinding_cache(), update_suspension_cache(), and update_visibility_cache().
|
mutableprivate |
Definition at line 1979 of file map.h.
Referenced by get_pathfinding_cache(), get_pathfinding_cache_ref(), and map().
Cache of coordinate pairs recently checked for visibility.
Definition at line 1988 of file map.h.
Referenced by build_map_cache(), and sees().
|
private |
Set of submaps that contain active items in absolute coordinates.
Definition at line 1983 of file map.h.
Referenced by add_item(), check_submap_active_item_consistency(), get_active_items_in_radius(), get_submaps_with_active_items(), i_clear(), i_rem(), load(), loadn(), make_active(), process_items(), shift(), and update_submap_active_item_status().
|
private |
Definition at line 1523 of file map.h.
Referenced by process_falling(), shift(), support_dirty(), and ter_set().
|
private |
This vector contains an entry for each trap type, it has therefor the same size as the traplist vector.
Each entry contains a list of all point on the map that contain a trap of that type. The first entry however is always empty as it denotes the tr_null trap.
Definition at line 1969 of file map.h.
Referenced by actualize(), clear_traps(), load(), map(), remove_trap(), shift_traps(), ter_set(), trap_locations(), and trap_set().
|
private |
Definition at line 2003 of file map.h.
Referenced by get_visibility_variables_cache(), and update_visibility_cache().
|
protected |
Definition at line 1795 of file map.h.
Referenced by add_field(), add_roofs(), bash_ter_furn(), bash_ter_success(), build_floor_cache(), build_floor_caches(), build_map_cache(), build_sunlight_cache(), clear_vehicle_cache(), collapse_at(), dont_draw_lower_floor(), draw_maptile(), get_nonant(), get_roof(), get_vehicles(), has_floor(), has_zlevels(), loadn(), map(), process_falling(), process_fields(), process_fields_in_submap(), process_items(), reset_vehicle_cache(), save(), saven(), shift(), spawn_monsters(), spread_gas(), support_dirty(), valid_move(), vehmove(), vehproceed(), and vertical_shift().